Re: [EXPAND] Split unquoted $@/$* correctly when IFS is set but empty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2014-10-08 15:26:36 +0800, Herbert Xu:
> commit 3c06acdac0b1ba0e0acdda513a57ee6e31385dce
> Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Date:   Wed Oct 8 15:24:23 2014 +0800
> 
>     [EXPAND] Split unquoted $@/$* correctly when IFS is set but empty
>     
>     Currently we do not field-split $@/$* when it isn't quoted and IFS
>     is set but empty.  This is obviously wrong.  This patch fixes this.
[...]

Well, if IFS is empty, field splitting is disabled. There's
nothing in POSIX that clearly says that $@ and $* should expand
to the positional parameters *as separate arguments in list
contexts*. yash and the Bourne shell behave like dash. Only
shells with array support behave differently.

The whole $*/$@ expansion is rather unclear in the POSIX spec.
I've just raised the problem on the Austin group mailing list.

See also

http://thread.gmane.org/gmane.linux.debian.devel.general/197901

Cheers,
Stephane

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux