On Sat, Oct 21, 2006 at 02:37:25PM -0400, A. Costa wrote:
> > I'm about to close this bug, thanks, Gerrit.
> 
> Thanks for the detailed explanation, and the good advice how not to get
> the error using "$*".  And apologies for my misunderstanding... but in
> hopes of extracting some public good from it, a last question:
> 
> If 'dash' and 'posh' behave correctly, and 'bash' does it differently,
> would that indicate a bug in how 'bash' parses "$@"?  The 'bash'

Yes.

> package description says:
> 
>       % dlocate -s bash | grep -B 1 POSIX
>        Bash is ultimately intended to be a conformant implementation of the
>        IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2).
> 
> Since 'dash' handles "$@" in a POSIX compliant way, therefore 'bash' does not.
> If this is a 'bash' bug, then it would be more profitable to reassign
> (and retitle) this bug to 'bash' rather than close it.
> 
> Note that the '--posix' switch of 'bash' doesn't make it act like 'dash':
> 
>       % bash --posix
>       % foo() {  export x="$@" ; } ; foo -f --c ; echo $?
>       0

I'd expect x="$@" to expand just the same as "x=$@"

 $ bash --version
 GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)
 Copyright (C) 2005 Free Software Foundation, Inc.
 $ bash --posix -xc 'x="$@"' foo bar baz
 + x='bar baz'
 $ bash --posix -xc '"x=$@"' foo bar baz
 + x=bar baz
 foo: x=bar: command not found
 $ 

Regards, Gerrit.


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

Reply via email to