From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20068 invoked from network); 17 Aug 1998 14:16:50 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 17 Aug 1998 14:16:50 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id JAA19642; Mon, 17 Aug 1998 09:55:41 -0400 (EDT) Resent-Date: Mon, 17 Aug 1998 09:55:32 -0400 (EDT) Sender: dfavor@austin.ibm.com Message-Id: <35D836E3.F7BEBC77@austin.ibm.com> Date: Mon, 17 Aug 1998 08:57:55 -0500 From: "David R. Favor" X-Mailer: Mozilla 4.05 [en] (X11; I; AIX 4.3) Mime-Version: 1.0 To: Zsh List Subject: Parameter Expansion questions Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-Message-ID: <"g0vax2.0.Ro4.CP3sr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1720 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu In ksh, word splitting occurs auto-magically via setting IFS, thus: SAVEIFS="$IFS" IFS=: splitpath=$PATH IFS="$SAVEIFS results in $splitpath having $PATH contents with ':' characters changed to blanks. In zsh, I'm having a challenge deciphering the manual about parameter expansion options. I've tried the following, without success. All fragments set $IFS=: before expansion: export SH_WORD_SPLIT // explicit 'set SH_WORD_SPLIT' splitpath=$* and splitpath=${=PATH} // implicit 'set SH_WORD_SPLIT' and splitpath=${buf:s:':':} // word split s:char: Can someone let me know what I'm doing wrong in each of these situations? I did figure out that this works: splitpath=${buf:gs/:/ /} Also, Also, a pointer to some good examples of parameter expansion would be great. Thanks.