On Sat, Jun 24, 2017 at 09:10:34PM +0700, Robert Elz wrote:
[...]
> The bugs in various implementations cause problems, yes, dealing with
> someone else's mistakes (and especially doing it in a way that things
> still work when the bugs get fixed) can be difficult.
> 
> But the rules, no, the rules for $* are actually trivial.
> 
> Unquoted, $* (or $@ which is identical) is exactly the same
> as the sequence
> 
>       $1 $2 $3 ...
> 
> would be, if we knew in advance how many of those we should write
> (which can be 0 of them of course.)
> 
> It is exactly that simple (ignoring implementation bugs.)

I think we are arguing about different things. My point (and which I
think is Greg's point) is that we should start recommending shell script
writers to stay away from the unquoted expansions of $* and $@.

Yes, the POSIX rules might be "trivial", but the actual implementations
are not, and shell script programmers care about running their scripts
on real implementations.

-- 
Eduardo Bustamante
https://dualbus.me/

Reply via email to