[PLUG] Extracting the pid from ps -ax

Richard F Seymour rseymour at spamcop.net
Tue May 21 18:09:30 UTC 2002


You could try:

ps ax | grep mpg123 | awk '{print $1}'


or to exclude the grep line itself:

ps ax | grep [m]pg123 | awk '{print $1}'


There's a better way to do my second try, but I can't remember it.

-- 
It's a horse of a different color!
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
    Richard Seymour, the Man Behind the Curtain
CHEEP GEEKS      Anarchy Software       FREE GEEK





More information about the PLUG mailing list