Hi'
i am runing a script thats run with a loop...while loop true.
when i exit the server..logon and again the script doenst run.
its a bash script test.sh.
i run it as:
#./test.sh &
what can be the priblem please?
thanks alot
Hi'
i am runing a script thats run with a loop...while loop true.
when i exit the server..logon and again the script doenst run.
its a bash script test.sh.
i run it as:
#./test.sh &
what can be the priblem please?
thanks alot
See
man nohup
ok and what about disown?
or disown -a? what does it mean?
Use disown if you forgot to start job with nohup. The -a option means all jobs that you have started.
Note disown is not available in all shells.
if this is my code,where should i put the nohup?
#! /bin/bash
while true
do
proc_num=$(ps a | grep yourscript | wc -l)
echo "loop1: "proc_num=$proc_num
sleep 2
while (( $proc_num < 5 ))
do
echo "loop 2: "proc_num=$proc_num
sleep 2
yourscript & #add a single process
done
echo " out of loop 1 "
sleep 1
done
#let something else use the box done
Great!! 10x alot