Tuesday, October 16, 2007

testing running process on unix system

here's a way to test it.
pgName=XXXXXXXXXXX # thesearchedprogramname
if [ `ps -ef | grep -v grep | grep "$pgName"| wc -l` -ne 1 ]

0 Comment :