From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6543 invoked from network); 21 Jun 1997 18:41:24 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 21 Jun 1997 18:41:24 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA22182; Sat, 21 Jun 1997 14:34:58 -0400 (EDT) Resent-Date: Sat, 21 Jun 1997 14:34:58 -0400 (EDT) Date: Sat, 21 Jun 1997 11:39:23 -0700 (PDT) From: Timothy Luoma X-Sender: luomat@kira Reply-To: luomat@peak.org To: Zoltan Hidvegi cc: Zsh hacking and development Subject: Re: kill and pid files In-Reply-To: <199706211637.MAA00840@hzoli.home> Message-ID: Organization: The PEAK FTP site for OpenStep & NeXTStep X-FTP: ftp://ftp.next.peak.org/pub/next/ X-URL: http://www.next.peak.org/~luomat MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-ID: <"70zYI.0.XQ5.Ix1hp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3275 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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