Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: kill and pid files
- X-seq: zsh-users 905
- From: Timothy J Luoma <luomat@xxxxxxxx>
- To: Robert Stone <rstone@xxxxxxxxxxxxx>
- Subject: Re: kill and pid files
- Date: Wed, 18 Jun 1997 16:16:13 -0400 (EDT)
- Cc: zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: <Pine.LNX.3.96.970617232424.28210A-100000@dreamer>
- Organization: The PEAK FTP site for OpenStep & NeXTStep
- Reply-to: luomat@xxxxxxxx
On Wed, 18 Jun 1997, Robert Stone wrote:
> Is there any reason kill should not take a filename as an
> argument? i.e. if the job specification is not a legal job name, or a
> legal pid, why not try to open a file with that name and see if it's
> first line is a valid pid?
well, I don't have the file part, but I use this
pid () {
for i in $*
do
echo `/bin/ps -auxwww | grep -v grep |
grep -w $i | awk '{print $2}' | tr -s '\012' ' '`
done
}
and then use it for something like
kill -HUP `pid sendmail`
but it doesn't have the nice expansion/matching stuff... more often than
not I know exactly what I want to kill. Note my version is only going to
match exactly (grep -w) and is case sensitive.
I don't know if this is anything like you wanted, I'm just trying to
contribute rather than just always asking ....
TjL
Messages sorted by:
Reverse Date,
Date,
Thread,
Author