Trouble with AWK script on Solaris machine



Hi ,
I'm running a script to grab a pid - which works beautifully on AIX ,HP and
SCO but not on Solaris. It looks like it can not get the pid...Any ideas:
pid=`ps -el | awk '( ($NF ~ /'"${UBS_SERVER}_serv"'/) && ($4 != mypid) &&
($5 != mypid) ){ printf "%d ",$4 }' mypid=$$ `

i have tried ps -eo with different formats ie: ppid pid etc...
Running out of ideas..

Thanking you in advanced

Pedds ; )



.



Relevant Pages

  • Re: Trouble with AWK script on Solaris machine
    ... > SCO but not on Solaris. ... > i have tried ps -eo with different formats ie: ppid pid etc... ... aren't you just re-implementing pgrep? ...
    (comp.lang.awk)
  • Re: Trouble with AWK script on Solaris machine
    ... > SCO but not on Solaris. ... > i have tried ps -eo with different formats ie: ppid pid etc... ... script as necessary. ... Is there an 'o' option on the Solaris version of ps? ...
    (comp.lang.awk)
  • Re: help with aix script required
    ... My expertise is in D3 and not AIX. ... A subsequent kill ... to extract the pid and then execute kill (pid ... PIB nnn is already connected" ...
    (comp.unix.aix)
  • Re: How to determine in shell if a certain program is running?
    ... >> determine in a Korn shell script if a certain program is still running? ... > need the 'w' flag whatever the manual says. ... As it tends to happen seldomly on AIX ... > A better way would be to record the pid and check on the basis of the pid. ...
    (comp.unix.shell)
  • Re: how to get statistics about memory usage ?
    ... I need to get some statistics about it's memory usage. ... it would be nice if the solution could also work with solaris... ... where <pid> is replaced by the pid of the process in ... Christophe ...
    (comp.os.linux.development.apps)