Killing process w/o number (csh)
Alan Barclay
alan at ukpoit.co.uk
Thu May 2 19:57:09 AEST 1991
In article <+-A_7A#@warwick.ac.uk> cudcv at warwick.ac.uk (Rob McMahon) writes:
>In article <3209 at mtecv2.mty.itesm.mx> jgabriel at mtecv2.mty.itesm.mx (Juan
>Gabriel Ruiz Pinto) writes:
>>set line = `ps -ax | grep -v grep | grep sysline`
>
>I've always wondered why people always do this rather than
>
> ps axc | grep sysline
the command "ps -ef | grep -v grep | grep listen" gives (all bar
command line delted)
/usr/etc/tcplisten ftp finger rlogin remsh rexec telnet
listen -n tcp -l 0002040190570101
while "ps -ef | grep listen" gives (all bar command line delted)
/usr/etc/tcplisten ftp finger rlogin remsh rexec telnet
listen -n tcp -l 0002040190570101
sh -c ps -ef | grep listen
grep listen
now obviously the shell to run the grep (*) and the grep itself have
now died so if you are wanting just the running commands or something
similar you need to remove the greps. In otherwords sometimes you need
it.
--
Alan Barclay
iT | E-mail : alan at ukpoit.uucp
Barker Lane | BANG-STYLE : .....!ukc!ukpoit!alan
CHESTERFIELD S40 1DY | VOICE : +44 246 214241
More information about the Comp.unix.shell
mailing list