On Sun, 18 Feb 2001, Vidiot wrote:

> >    What's the best/safest way to loop a script over and over again?
> >
> >    All it does is call a different program with arguments (it plays mp3
> >files) and I want it to loop and start again when it reaches the end.
> >
> >    #!/bin/sh
> >    amp -p "file one.mp3"
> >    amp -p "file two.mp3"
> >    ...
>
> You can use a while loop, using a variable that is always true.  It'll never
> end that way :-)

the best way is to just do:

while true ; do
...
done


  the word "true" is a shell built-in which always returns a logical
value of true for the purposes of the loop.

rday

-- 
Robert P. J. Day
Eno River Technologies, Durham NC
Unix, Linux and Open Source training


"This is Microsoft technical support.  How may I misinform you?"



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to