[PLUG] Extracting the pid from ps -ax
D. Cooper Stevenson
cooper at linux-enterprise.net
Wed May 22 22:28:21 UTC 2002
On Wed, 2002-05-22 at 15:17, Randal L. Schwartz wrote:
<snip>
> What's wrong with:
>
> ps c | awk '/netscape/ { print $1 }'
>
> where the "c" flag ensures that the command name is included
> *without* its parameters so that you don't get a hit on the grep
> in the first place!
>
That's true if you know that the c flag is supported on each of your
target platforms.
-Cooper
More information about the PLUG
mailing list