Re: grepping in ps output

2000-04-30 Thread Chris Frey
On Fri, Apr 28, 2000 at 07:39:37PM -0400, B.C.J.O wrote: > Evi Nemeth had a good trick for dealing with that situation using the > short test notation: > > f'rinstance, you want to nuke every process owned by user: > > kill -9 `ps aux | grep [u]ser | awk '{print $2}'` > > ... where the trick is

Re: grepping in ps output

2000-04-30 Thread Larry Morrow
Hi , Just use eax with =out the "-" for linux. example for named ps eax | grep named | sed -e 's/^ *//' -e 's/ .*//' Larry At 12:18 AM 4/29/00 +0200, Paul van Empelen wrote: > >Hi, > >I am working on a bourne script that can restart services if they hang. >If the process does not respond, I