Ruby Progress Catcher

So what I am asking how to do is have a script that reads all of the
lines in a text file, then in a loop have it print "Lines: (number its
on) and have this number increment by 1 until the text file is
completely empty. Thanks to all who attempt :slight_smile:

On Wed, Jun 5, 2013 at 3:13 AM, Carl s. [email protected] wrote:

So what I am asking how to do is have a script that reads all of the
lines in a text file, then in a loop have it print "Lines: (number its
on) and have this number increment by 1 until the text file is
completely empty. Thanks to all who attempt :slight_smile:

I am not really sure what to make of this: reading does not modify the
file
so it cannot be “empty” after any amount of read operations. Are you
maybe
just looking for numbering lines in a file? Then I suggest

$ cat -n the_file

Kind regards

robert

Carl s. [email protected] wrote:

So what I am asking how to do is have a script that reads all of the
lines in a text file, then in a loop have it print "Lines: (number its
on) and have this number increment by 1 until the text file is
completely empty. Thanks to all who attempt :slight_smile:

What’s in it for us?