Quote:
Originally Posted by panyam
Julirani,
I am not sure of the application process, but there is a possibility that there will be multiple instances of a.sh running , but the time u manually check it , the execution of script might be over.
Check in the remaining part of the script any infinite loops or conditions exist?..
|
HI Panyam,
Thanks for your reply . Actually , it is strange , when i doing the grep using the below command
command:
ps -ef | grep "/appl/a.sh" | grep -v "grep"
output :
user 20169 20168 0 06:00:13 ? /bin/ksh /appl/a.sh
user 20168 1 0 06:00:13 ? 0:00 sh -c /appl/a.sh
But when i print the value of the var for the below command it showing diffrent .
command:
PROCESS=`ps -ef | grep "/appl/a.sh" | grep -v "grep" | wc -l`
echo $PROCESS
output :
4
But the output always not the same .some thimes it showing the correct value i.e 2 .
So i am unable to find the root cause . Is it any problem with the OS ?
Could you please help me regarding this.
Thanks in advance .