Subject: Re: The new rc.d stuff...
To: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
From: Robert Elz <kre@munnari.OZ.AU>
List: current-users
Date: 03/19/2000 04:22:34
    Date:        Sat, 18 Mar 2000 11:10:06 -0500
    From:        Mason Loring Bliss <mason@acheron.middleboro.ma.us>
    Message-ID:  <20000318111006.A1199@acheron.middleboro.ma.us>

This has nothing to do with the new rc.d and not much to do
with your scripts, this was just the prompt for something I
had meant to say for a while ...

I am certainly not referring to how many processes this actually
kills...

  | kill_atalkd()
  | {
  |   echo "Killing afpd processes..."
  |   ps ax | grep afpd | grep -v grep | awk '{print $1}' | xargs -n 1 kill
  |   echo "Killing atalkd processes..."
  |   ps ax | grep atalkd | grep -v grep | awk '{print $1}' | xargs -n 1 kill
  | }

That "ps ax | grep atalkd | grep -v grep" technique is one I have
seen many times, and always wondered why

	ps axc | grep atalkd

isn't used instead.  Not only does the 'c' flag eliminate the grep
much more effeciently than "grep -v grep" does, but it also finds
the processes, even if they've scribbled on their argv[0].

kre