From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22939 invoked from network); 17 Aug 1998 15:56:19 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 17 Aug 1998 15:56:19 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id LAA23370; Mon, 17 Aug 1998 11:42:40 -0400 (EDT) Resent-Date: Mon, 17 Aug 1998 11:42:34 -0400 (EDT) Sender: B.Stephens@isode.com To: "David R. Favor" Cc: Zsh List Subject: Re: [Fwd: Parameter Expansion questions] References: <35D849A7.4EB5F516@austin.ibm.com> Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII From: Bruce Stephens Date: 17 Aug 1998 16:44:34 +0100 In-Reply-To: "David R. Favor"'s message of "Mon, 17 Aug 1998 10:17:59 -0500" Message-ID: X-Mailer: Gnus v5.6.27/XEmacs 20.4 - "Emerald" Resent-Message-ID: <"6FBAe1.0.Ti5.fz4sr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1724 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu "David R. Favor" writes: > # paths to search > editpath=${EDITPATH:-"$PATH:$CDPATH"} > > IFS=: > > if [ $shell_type = 'zsh' ] ; then <<< $shell_type > editpath=${editpath:gs/:/ /} > else > editpath=$editpath > fi > > IFS="$BACKUP_IFS" > > for name in $* ; do > > for dir in ${=editpath} ; do <<< ${=editpath} > > # find/edit the file > > done > > done How about replacing editpath=${editpath:gs/:/ /} with editpath=(${=editpath}) i.e., you create editpath as an array, which allows the loop to be the same in ksh and zsh: for dir in $editpath; do That doesn't remove the need for the shell choice earlier, however.