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:

路路路

--
Posted via http://www.ruby-forum.com/.

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

路路路

On Wed, Jun 5, 2013 at 3:13 AM, Carl s. <lists@ruby-forum.com> 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:

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

What's in it for us?

路路路

Carl s. <lists@ruby-forum.com> 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: