Make a bash script loop from start
Hi all, I am very new to Linux and I have a question.
How can I get a bash script to keep looping from the start "without" using any goto commands :) for example my script has the following commands . . . w sleep 1 clear . . . but then I want it to start all over again from the "w" command and keep doing so untill stop it. Any assistance would be a real help to me :) Thanks Darren |
Make the last line of the script
exec $0 |
Hi and welcome to LQ! How do you suppose to stop the process? You can try an infinite loop like the following and stop it using Ctrl-C
Code:
while true |
Code:
#!/bin/bash |
Working perfect!!!
Thanks for your help everyone, it's working perfect now!! :)
|
Sounds like homework to me???
|
All times are GMT -5. The time now is 02:55 AM. |