The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 10-07-2008
yale_work yale_work is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 28
I tried something like that.....
ps -ef | grep test
if [ `ps -efo tty,time,args|awk '/test/{print $1}'` -eq '-' -a `ps -efo tty,time,args|awk '/test/{print $2}'` -ne "0:00" ] then
1
fi

error message was:
0403-057 Syntax error: `fi' is not expected.