Hello,
I have problems executing a script in ksh with this script named process.sh:
ps -ef | grep -v grep | grep process.sh | wc -l | read a b
if [ $a -gt 1 ]
then
echo "The script is running"
exit 0
fi
The problem is that when I execute the script, sometimes it shows the message "The script is running", when I think it's impossible.
Is something wrong?
Thanks in advance.
I have problems executing a script in ksh with this script named process.sh:
ps -ef | grep -v grep | grep process.sh | wc -l | read a b
if [ $a -gt 1 ]
then
echo "The script is running"
exit 0
fi
The problem is that when I execute the script, sometimes it shows the message "The script is running", when I think it's impossible.
Is something wrong?
Thanks in advance.