[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Ignoring ps's pid in ps (was: kill with regex?)



Does anyone know of a way to use the standard 'ps' to get a process
listing without showing the pid of that instance of 'ps' itself, WITHOUT
any piping being performed or auxiliary processes being done, and without
using a different utility, such as 'pgrep'?

For example, if there are multiple 'ps' processes running on my system,
and if I issue this command, ...

  ps -C ps u

... then I'll see a line for each 'ps', including this one which I
issued.  But I don't want to see a line for the 'ps' which I'm running,
nor run 'pgrep' or any other program, nor make use of any kind of
piping, redirection, etc.

In other words, can I get my desired effect only using 'ps' and its
command-line options?

I know that there are other ways to do this.  I pose this question
solely to satisfy my intellectual curiosity, and it only concers 'ps'
itself and its options.

Thanks in advance.

-- 
 Lloyd Zusman
 ljz@asfast.com



Reply to: