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'?

> 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?

>  $ 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
>  $ 

Anyway it's clear from that that the two expansions differ.  I notice
that 'dash' and 'posh' do almost the same thing, but don't retain
single quotes for 'x="$@"':

        % dash -xc 'x="$@"' foo bar baz
        + x=bar baz
        % dash -xc '"x=$@"' foo bar baz
        + x=bar baz
        foo: 1: x=bar: not found
        % posh -xc 'x="$@"' foo bar baz
        + x=bar baz
        % posh -xc '"x=$@"' foo bar baz
        + x=bar baz
        foo: x=bar: not found

...also the error messages for 'dash' and 'posh' differ slightly.


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

Reply via email to