how to have a shell script that will keep running continuously as a running process?
ie. it should re-run if the code in the script has finished its execution.
Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from http://www.planetm.co.in
On Jul 5, 2002 at 13:50, akshaysalkar wrote:
how to have a shell script that will keep running continuously as a running process?
ie. it should re-run if the code in the script has finished its execution.
while true; do scriptname ; done
or in the script:
while true do code done
--- akshaysalkar akshaysalkar@indiatimes.com wrote:
how to have a shell script that will keep running continuously as a running process?
[snip] RTFM -> www.tldp.org Use /etc/inittab, nd invoke a process with a loop such that, when it finishes itz computation, it restarts the computation.......if else should help u out.
Trevor Warren
ie. it should re-run if the code in the script has finished its execution.
Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from http://www.planetm.co.in
===== ( >- GNU/LINUX, It's all about CHOICE -< ) /~\ __ http://www.qmailtheeasyway.com __ /~\ | ) / mailto: trevor@zenith-india.com \ (/ | |_|_ \ Project Manager, Linux/Unix. ZCL / _|_| ___________________________________/
__________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com
I guess you should put the script into a while (1) loop ;)
but this is not suggested .... look out for starting the same script in daemon mode ..... ask google how to do that ;)
Best Regards, -Mitul Limbani (mitull @ wrox.com) Support Editor Wrox India http://www.wrox.com/ http://p2p.wrox.com/
Search and Read Libraries of our Books Online at www.wroxbase.com
Programmer to Programmer (tm)
The sender cannot accept any liability for any loss and or damage sustained as a result of software viruses. It is your responsibility to carry out such virus checking as is necessary before opening any attachment.
-------------------------------------------------------------- Peer Information India Pvt Ltd, Mumbai, India