Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uunet!mcsun!ukc!axion!vision!ukpoit!alan From: alan@ukpoit.co.uk (Alan Barclay) Newsgroups: comp.unix.shell Subject: Re: Killing process w/o number (csh) Message-ID: <1991May2.095709.25594@ukpoit.co.uk> Date: 2 May 91 09:57:09 GMT Article-I.D.: ukpoit.1991May2.095709.25594 References: <1991Apr18.210847.22260@en.ecn.purdue.edu> <3209@mtecv2.mty.itesm.mx> <+-A_7A#@warwick.ac.uk> Organization: iT - The Information Technology Business Of The Post Office Lines: 31 In article <+-A_7A#@warwick.ac.uk> cudcv@warwick.ac.uk (Rob McMahon) writes: >In article <3209@mtecv2.mty.itesm.mx> jgabriel@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@ukpoit.uucp Barker Lane | BANG-STYLE : .....!ukc!ukpoit!alan CHESTERFIELD S40 1DY | VOICE : +44 246 214241