Craig Sharp wrote: > I need to put a counter in a script that processes a file line by line. > I want the counter to alway stays on the same line on the console but > increment. This is to be a baby sitter so that the user can see the > numbers increase. I do not want to scroll but print the number, erase > and print the next number untill finished.
Just print a \r before writing the number. printf "\r %u ", $counter; You may need to unbuffer stdout to get it to flush properly. -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (Free site for Perl/Lakers) _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs