Date: Sat, 27 May 2000 09:36:25 -0400 From: Randall Hopper <aa8vb@nc.rr.com> To: housley@thehousleys.net Cc: stable@FreeBSD.ORG Subject: Re: killall question Message-ID: <20000527093625.A1557@nc.rr.com> In-Reply-To: <200005271258.IAA29766@thehousleys.net>; from housley@thehousleys.net on Sat, May 27, 2000 at 12:58:25PM -0000 References: <200005271258.IAA29766@thehousleys.net>
next in thread | previous in thread | raw e-mail | index | archive | help
housley@thehousleys.net:
|Randall Hopper <aa8vb@nc.rr.com> said:
|
|> I have a script I run named "newroot". I want to kill it with killall.
|>
|> > ps -ax | grep newroot
|> 842 1 rhh /bin/sh /home/rhh/bin/newroot 360
|>
|You will have to do something like
|
|kill `ps -ax | grep newroot | sed -e '^[0-9]*'`
Ok. I thought I'd at least try to use the system version, but sounds like
it's just not as flexible as killall's on other systems.
Here's the shell script I settled on to override the default /usr/bin/killall:
ps -x | grep "$1" | egrep -v "grep|$0" | awk '{print $1;}'
Thanks for the help.
--
Randall Hopper
aa8vb@nc.rr.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000527093625.A1557>
