From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6557 invoked from network); 21 Jun 1997 18:49:08 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 21 Jun 1997 18:49:08 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA22348; Sat, 21 Jun 1997 14:42:50 -0400 (EDT) Resent-Date: Sat, 21 Jun 1997 14:42:50 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199706211846.OAA01626@hzoli.home> Subject: Re: kill and pid files In-Reply-To: from Timothy Luoma at "Jun 21, 97 11:39:23 am" To: luomat@peak.org Date: Sat, 21 Jun 1997 14:46:40 -0400 (EDT) Cc: zsh-workers@math.gatech.edu (Zsh hacking and development) X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"xLfJ.0.7T5.g22hp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3276 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > > 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'? The above function should find all processes called foo. It should work on all systems with BSD-style ps. Zoltan