Re: expand: Fix ghost fields with unquoted $@/$*

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

 



On Fri, Mar 23, 2018 at 01:52:10PM +0100, Harald van Dijk wrote:
>
> It doesn't, and I didn't say it did. POSIX doesn't care how it's
> implemented, POSIX cares about the results produced. When another approach
> produces the same results, both approaches are equally correct.

Right, but restoring the old behaviour for white spaces only is
silly.  It's silly
to have this work:

	set -- A1 B2 C3
	echo ${@%2 C3}

but not this:

	set -- A1 B2 C3
	IFS=:
	echo ${@%2:C3}

Of course, in the old dash both worked which makes more sense.
But that was at the cost of not eliminating empty fields which
violates POSIX.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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