Help: Command line rotating line

Brian McKee brian.mckee at gmail.com
Wed Feb 11 16:05:42 UTC 2009


On Wed, Feb 11, 2009 at 10:58 AM, Chaman Singh Verma <csv610 at gmail.com> wrote:
> Hello,
>
> I am not quite sure if this is the place to ask some specific question about
> linux/unix functionality. So if it
> is not the right place, please ignore this mail.
>
> I have seen many software that uses command line rotating line to indicate
> wait for example
>
> Processing Sequence ....  |    This | line keeps on rotating

It's just printing - \ | / - with a 'backspace' between each character.

In bash, you can do this with
echo -n "-" ; sleep 1 ; echo -n "^H\\" ; sleep 1 ; echo -n "^H|"
etc.

(hope I'm not doing someone's homework for them!)

Brian




More information about the ubuntu-users mailing list