Grepping for a process (was Re: Killing process w/o number (csh))

Rob McMahon cudcv at warwick.ac.uk
Sat Apr 27 00:00:29 AEST 1991


In article <1991Apr24.214750.24522 at athena.mit.edu> jik at athena.mit.edu
(Jonathan I. Kamens) writes: 
>Because the 'c' option to grep isn't universally supported.  On an A/UX (SysV
>based) system:
>
>% ps axc
>usage: ps [ -edalf ] [ -c corefile ] [ -s swapdev ] [ -n namelist ] [ -t tlist ]
>        [ -p plist ] [ -u ulist ] [ -g glist ]

But note that `x' isn't support either, so if you can do

	ps ax | grep whatever | grep -v grep

you can also do

	ps axc | grep whatever

I assume there's a similar option for System V ?

One case has been pointed out to me that fails: if the `whatever' is a shell
script, the `ps c' will report it as `sh'.

Rob
-- 
UUCP:   ...!mcsun!ukc!warwick!cudcv	PHONE:  +44 203 523037
JANET:  cudcv at uk.ac.warwick             INET:   cudcv at warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England



More information about the Comp.unix.shell mailing list