It is currently Sat, 04 Dec 2021 20:07:16 GMT

Author Message
 need a wait indicator
Hello experts,

I have been trying to find a little program or script that will show a
little rotating indicator. This is so that the user will know the script is
doing something rather than just looking at a flashing cursor. One of my
colleagues told me that unix already has one in there that goes like this |
/ - \ ....

any ideas


 Tue, 22 Jul 2003 04:32:05 GMT   
 need a wait indicator
In article <95ch86$>,
  "Abid Jindani" <> wrote:

When I want to show a user something is happening in a shell script, I
call a little function like dots5

dots5 ()
while :; do
        ${sleep} 1
        echo ".\c"
done &

          sleep 5
[ -n "$PID" ] && kill $PID >/dev/null 2>&1
echo ""

which prints 5"."'s across the screen before exiting. Of course, you
can extend the time easily or make the echo statement more involved if
you like.

Good Luck,

Sent via

 Tue, 22 Jul 2003 07:58:05 GMT   
 need a wait indicator

you mean something like that? there is another thread (howto make a
statusbar in bash) with another solution. for sleep 10 put your command, ie
make bzImage>/dev/null or something else.

function progress()
renice 20 $$ > /dev/null
while true; do
  echo -en '|\r'
  sleep $DELAY
  echo -en '/\r'
  sleep $DELAY
  echo -en '-\r'
  sleep $DELAY
  echo -en '\\\r'
  sleep $DELAY
progress & sleep 10 ; kill $!

dont blame me for my poor english


Home   : | Es kann mich niemand daran hindern
Projekt:    | ber  Nacht  klger   zu   werden.
Projekt:  |                        K. Adenauer
Mailingliste, Forum, Newsserver, Anleitungen, Antworten -? Newbie-Net :o)

 Tue, 22 Jul 2003 07:18:19 GMT   
   [ 3 post ] 

Similar Threads

1. first X impressions: no hourglass wait indicators

2. fork,exec and wait and wait and wait and wait

3. Talk waits and waits for invitation (2nd)

4. Talk waits and waits for invitation

5. --wait and --random-wait ?

6. wait. wait pid

7. wait or not to wait, that is my question

8. after type the password need to wait a long time when telnet solaris

9. Need help with fork/exec/wait

10. HELP: Need function to wait ~1/10 s

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software