From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12495 invoked from network); 21 May 2002 15:08:00 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 21 May 2002 15:08:00 -0000 Received: (qmail 26671 invoked by alias); 21 May 2002 15:07:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17204 Received: (qmail 26654 invoked from network); 21 May 2002 15:07:46 -0000 From: "Bart Schaefer" Message-Id: <1020521150727.ZM22860@candle.brasslantern.com> Date: Tue, 21 May 2002 15:07:26 +0000 In-Reply-To: <20020521054822.GA21674@dman.com> Comments: In reply to Clint Adams "command substitution gets confused by case parens" (May 21, 1:48am) References: <20020521054822.GA21674@dman.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Clint Adams , zsh-workers@sunsite.dk Subject: Re: command substitution gets confused by case parens MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 21, 1:48am, Clint Adams wrote: } Subject: command substitution gets confused by case parens } } According to POSIX, I think, the following should work. Bash2 chokes on it as well: bash2: command substitution: line 2: syntax error near unexpected token `abc' bash2: command substitution: line 2: ` abc' The following works in both shells, and is the reason that the fully- parenthesized case conditions were introduced, IIRC. echo $(case $TEST in (abc) echo a ;; (def) echo b ;; esac) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net