I want to test if script.sh is being run with nohup ... but $0 does not contain nohup part...
purpose: script.sh should only be ran with nohup if user forgets nohup then it should echo "run with nohup" && exit.......
I have to start a process as background and I know how to start it with "nohup" but over the time "nohup.out" is getting bigger and actually I dont want because the log is giving me the same output as nohup.out.
for ((i=1; i<=400000; i++))
echo "loop $i"
numberps=`ps -ef | grep php | wc -l`;
if [ $numberps -lt 110 ]
php5 script.php &
echo too much process