#test.sh  
#!/bin/sh   
pid=`ps -ef | grep -v grep | grep -v "test.sh" | grep $1 | sed -n  '1P' | awk '{print $2}'`  
if [ -z $pid ] ; then  
    #echo "no this process" > 1.txt
    echo "no" > 1.txt
else  
    #echo $pid > 1.txt
    echo "yes" > 1.txt
fi  


