D
darenbell
Hi, I'm looking for a way to implement this idea:
-------------------------------------
count=1
total=15
until count>total
print "Record #{count} of #{total} processed."
count+=1
end
-------------------------------------
I want this to print out in a Linux shell. However, I'd prefer it if
there was a way to have this counter increment without printing a new
line. As in, from the user's perspective the 'count' would just
increment until it matched the total... all taking place on the same
line.
I know I've seen this done, but can Ruby do this?
-------------------------------------
count=1
total=15
until count>total
print "Record #{count} of #{total} processed."
count+=1
end
-------------------------------------
I want this to print out in a Linux shell. However, I'd prefer it if
there was a way to have this counter increment without printing a new
line. As in, from the user's perspective the 'count' would just
increment until it matched the total... all taking place on the same
line.
I know I've seen this done, but can Ruby do this?