From: ara.t.howard@... Date: 2006-11-08T02:35:24+09:00 Subject: Re: How to make a cycling counter from commandline? On Wed, 8 Nov 2006, Tim Pease wrote: > $ cat tmp.rb > > STDOUT.sync = true > > total = ARGV[0] || 15 > count = 1 > > until count>total > print "\rRecord #{count} of #{total} processed" > count += 1 > sleep 0.25 > end > > print "\n" > > > That should do you what you want. The secret is the carriage return > "\r" at the beginning of the print string. That will bring the cursor > back to the beginning of the line and then overwrite anything > currently on that line. > > Blessings, > TwP man, you learn something every day! that's pretty sweet. -a -- my religion is very simple. my religion is kindness. -- the dalai lama