From: Timothy J Luoma <luomat@peak.org>
To: Robert Stone <rstone@accesscom.com>
Cc: zsh-users@math.gatech.edu
Subject: Re: kill and pid files
Date: Wed, 18 Jun 1997 16:16:13 -0400 (EDT) [thread overview]
Message-ID: <Pine.NXT.3.96.970618161237.19016A-100000@cc344191-a.ewndsr1.nj.home.com> (raw)
In-Reply-To: <Pine.LNX.3.96.970617232424.28210A-100000@dreamer>
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
next prev parent reply other threads:[~1997-06-18 20:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-06-18 7:25 Robert Stone
1997-06-18 20:16 ` Timothy J Luoma [this message]
1997-06-19 6:42 ` Zoltan Hidvegi
1997-06-19 12:19 ` Matt Welland
1997-06-21 15:07 ` Timothy J. Luoma
1997-06-19 10:53 ` Vardhan Varma
1997-06-18 13:05 Wez Furlong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.NXT.3.96.970618161237.19016A-100000@cc344191-a.ewndsr1.nj.home.com \
--to=luomat@peak.org \
--cc=rstone@accesscom.com \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).