* Vidiot [Sun, Feb 18, 2001 at 04:53:42PM -0600]:
> > 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 :-)
>
In bash, you can use a C-style endless for loop:
for ((;;)); do
amp -p "file one.mp3"
amp -p "file two.mp3"
...
amp -p "file N.mp3"
done
Hope that helps.
--
Johannes Eriksson <[EMAIL PROTECTED]>
Computer Science, AA University
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list