[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix testsuite errors due to shell quoted parameter expansion issue.
From: |
Tim Rice |
Subject: |
Re: Fix testsuite errors due to shell quoted parameter expansion issue. |
Date: |
Tue, 3 Aug 2010 14:42:13 -0700 (PDT) |
[trimming CC]
On Tue, 3 Aug 2010, Eric Blake wrote:
> [adding autoconf to document some shell bugs]
[snip]
> And meanwhile, I found a ksh93 parsing bug (don't know where to report
> that):
>
> $ ksh -c 'a(){ echo hi; }; a'
> ksh: syntax error at line 1: `}' unexpected
> $ ksh -c 'a() { echo hi; }; a'
> hi
> $ bash -c 'a(){ echo hi; }; a'
> hi
> $ /bin/sh -c 'a(){ echo hi; }; a'
> hi
>
> ksh is the only shell that requires a space between the ) and {, even
> though the ) is a metacharacter and should not need trailing space (even
> Solaris /bin/sh got that right).
Hmm, on my UnixWare machine
$ ksh -c 'a(){ echo hi; }; a'
hi
$ ksh88 -c 'a(){ echo hi; }; a'
hi
Using the 'set -o emacs' ^V trick Ralf taught me, we see
ksh is Version M-12/28/93e-SCO
ksh88 is Version M-11/16/88h
On my Solaris 10 box with ksh Version M-11/16/88i
$ ksh -c 'a(){ echo hi; }; a'
hi
Even my old OpenLinux 3.1.1 machine running pdksh-5.2.14-6MR gets it right
What version of ksh did you test on?
--
Tim Rice Multitalents (707) 887-1469
address@hidden
Re: Fix testsuite errors due to shell quoted parameter expansion issue., Mikael Magnusson, 2010/08/04
Re: Fix testsuite errors due to shell quoted parameter expansion issue., Chet Ramey, 2010/08/08