i have the following shell script-
#!/bin/bash
echo "enter the full path of script";
read path;
while true
ps aux | grep -v grep | grep -q $path || ( nohup php -f $path & )
done
I am executing in following way -
bash test.sh
enter the full path of script
php_test.php
test.sh: line 7: syntax error near unexpected token `done'
test.sh: line 7: `done'
there is a php_test.php in the same directory as the present one. PLease help. Thanks in advance.
$pathwith double quotes to prevent spaces in the variable to have bash consider it as two arguments after expansion.