On Mon, Oct 23, 2006 at 05:12:11AM -0400, A. Costa wrote:
> On Mon, 23 Oct 2006 08:09:48 +0000
> Gerrit Pape <[EMAIL PROTECTED]> wrote:
> > > If 'dash' and 'posh' behave correctly, and 'bash' does it
> > > differently, would that indicate a bug in how 'bash' parses "$@"?
> > > The 'bash'
> > 
> > Yes.
> 
> Then would you prefer this bug be reassigned to 'bash'?

Yes, once we agree on this.

> > I'd expect x="$@" to expand just the same as "x=$@"
> 
> The idea behind "x=$@" is not obvious; it's not in the code I'd
> used.  Was it meant as a plainer bug example, or some sort of debunking
> of the bug, or something else?

It was meant as a plainer bug example, but I failed it seems.  Let's
have another try:

 $ bash --version
 GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)
 Copyright (C) 2005 Free Software Foundation, Inc.
 $ bash --posix -xc 'export x="$@"; echo $x; echo $y' foo bar 'y=baz boo'
 + export 'x=bar y=baz boo'
 + x='bar y=baz boo'
 + echo bar y=baz boo
 bar y=baz boo
 + echo
 
 $ dash -xc 'export x="$@"; echo $x; echo $y' foo bar 'y=baz boo'
 + export x=bar y=baz boo
 + echo bar
 bar
 + echo baz boo
 baz boo
 $ posh -xc 'export x="$@"; echo $x; echo $y' foo bar 'y=baz boo'
 + export x=bar y=baz boo
 + echo bar
 bar
 + echo baz boo
 baz boo
 $ 
 $ bash --posix -xc 'export "x=$@"; echo $x; echo $y' foo bar 'y=baz boo'
 + export x=bar 'y=baz boo'
 + x=bar
 + y='baz boo'
 + echo bar
 bar
 + echo baz boo
 baz boo
 $ dash -xc 'export "x=$@"; echo $x; echo $y' foo bar 'y=baz boo'
 + export x=bar y=baz boo
 + echo bar
 bar
 + echo baz boo
 baz boo
 $ posh -xc 'export "x=$@"; echo $x; echo $y' foo bar 'y=baz boo'
 + export x=bar y=baz boo
 + echo bar
 bar
 + echo baz boo
 baz boo
 $ 

Here bash --posix behaves differently in the first case.

Regards, Gerrit.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to