Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: kill and pid files
- X-seq: zsh-workers 3275
- From: Timothy Luoma <luomat@xxxxxxxx>
- To: Zoltan Hidvegi <hzoli@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: kill and pid files
- Date: Sat, 21 Jun 1997 11:39:23 -0700 (PDT)
- Cc: Zsh hacking and development <zsh-workers@xxxxxxxxxxxxxxx>
- In-reply-to: <199706211637.MAA00840@xxxxxxxxxx>
- Organization: The PEAK FTP site for OpenStep & NeXTStep
- Reply-to: luomat@xxxxxxxx
On Sat, 21 Jun 1997, Zoltan Hidvegi wrote:
>
> Did you try my script? kill -TERM `pid foo bar baz` will kill all foo, bar,
> baz named processes. And of course it can be improved, since sed is not
> necessary:
>
> pid () {
> setopt localoptions extendedglob
> local i
> for i
> do
> echo "${(M)${(M)${(f)$(ps acx)}:%* $i #}## #<->}"
> done
> }
Yes but what if there are TWO processes running with the name 'foo'?
I want to be able to kill them both with one
kill -9 `pid foo`
But this may be a different in what we are calling using 'ps'
TjL
Messages sorted by:
Reverse Date,
Date,
Thread,
Author