My program (which happens to be in Perl, though I don\'t think this question is Perl-specific) outputs status messages at one point in the program of the form Progress: x/
I know it's not quite what you asked for, but possibly better. I happened on this same problem and so rather than deal with it too much went to using Term::ProgressBar which looks nice too.