From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11347 invoked from network); 11 Feb 1997 16:26:07 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 11 Feb 1997 16:26:07 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id LAA03808; Tue, 11 Feb 1997 11:13:41 -0500 (EST) Resent-Date: Tue, 11 Feb 1997 11:13:41 -0500 (EST) From: Zefram Message-Id: <20587.199702111612@stone.dcs.warwick.ac.uk> Subject: Re: Wildcards in path question To: olsenc@ichips.intel.com (Clint Olsen) Date: Tue, 11 Feb 1997 16:11:58 +0000 (GMT) Cc: zsh-workers@math.gatech.edu In-Reply-To: <19970210172745.55371@dtthp169.jf.intel.com> from "Clint Olsen" at Feb 10, 97 05:27:45 pm X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]8868.37 X-US-Congress: Moronic fuckers Content-Type: text Resent-Message-ID: <"h3IAT2.0.Rx.qg90p"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2897 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Clint Olsen wrote: >Thanks for your help getting wildcards in my path. I was wondering how I >might be able to use them so that they are added to my path iff they >existed. We have a very heterogenous environment here and certain >directories (like /opt) exist on some of the machines. Otherwise, the >non-existence causes the expansion to barf out. I'd rather it fail >silently somehow to allow the sourcing of my environment to continue. The NULL_GLOB option causes glob patterns that don't match anything to expand to nothing, rather than causing an error. This can be turned on for a single glob pattern by using the (N) modifier: path=( "$path[@]" /opt/*/bin(N) ) -zefram