Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 10-18-2006, 11:17 PM   #1 (permalink)
Greg's Avatar
 
Indeed.

Join Date: Dec 2004

Posts: 1,553

Greg is on a distinguished road

Default Quick BASH question

I was wondering, how do you make a bash script repeat itself indefinitely? I Googled it but found no answer.

Thanks
~Greg
__________________
Greg is offline  
Old 10-19-2006, 03:22 AM   #2 (permalink)
 
Banned

Join Date: Sep 2005

Posts: 5,191

The General

Default

At the end of it, put sh /path/to/itself.sh like this
Code:
#!/bin/bash
printf "Hello World!"
sh /home/ted/bin/lol.sh
/home/ted/bin/lol.sh being the name of the script.
The General is offline  
Old 10-19-2006, 10:05 AM   #3 (permalink)
 
Master Techie

Join Date: Apr 2004

Posts: 2,534

horndude is on a distinguished road

Default

or just make an infinite loop:

x=1
while x=1 do
horndude is offline  
Old 10-19-2006, 07:04 PM   #4 (permalink)
Greg's Avatar
 
Indeed.

Join Date: Dec 2004

Posts: 1,553

Greg is on a distinguished road

Default

Cool, thanks guys
__________________
Greg is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On