Subject: Re: kill in bash script
To: None <netbsd-help@netbsd.org>
From: joerch <helix@mayn.de>
List: netbsd-help
Date: 11/13/2002 15:56:33
On Wed, Nov 13, 2002 at 02:06:58PM +0000, Carlo Smith wrote:
> 
> Thats the way to manualy find the pid and then kill it ... but how do I pick 
> out the pid in a script?
> 

first go to your local bookstore and get one about shellscripting 
or about the bash.

i am not sure if this will work on netbsd, but i think so:

kill -HUP `ps ax |grep <name>|colrm 8`


man ps 
man grep 
man colrm
man cut

i think this commands you got on most unix machines and you 
do not need the ports or another extra programm.

you can take colrm out and fill cut in (with the right switches).
and for the name, maybe $1 or whatever.

-- 
gruesse 

joerg "joerch" buechner

http://www.home.mayn.de/helix