posix: ash vs sh and the expansion of "$@"

walter harms wharms at bfs.de
Fri Sep 8 17:32:21 UTC 2006



Juergen Hennerich wrote:
>
>>
> 
> If you read both man pages (bash and the man page from the BSD Almqhist
> shell) you'll see, that IFS is only mentioned for the first option
> (which you already mentioned). The behavior for the $@ is undefined in
> this case. So both are right. I think posix allows both. Although I have
> read somewhere that the ash behavior was called the old behavior and the
> bash version the new behavior.
> 
> If you make such a document, I think it would be the best here not to
> document the behavior, but to show, what is defined (and what not). No
> shell script should rely on a specific undefined behavior (especially
> when it is not necessary like in this case). There is even a big
> difference between the different descendants of the original Almquist
> shell.
> 
> -> http://www.in-ulm.de/~mascheck/various/ash/
> 
> Also the Advanced Bash Scripting Guide and the BASH FAQ
> (http://cnswww.cns.cwru.edu/~chet/bash/FAQ) might be interesting resources.
> 
> Juergen
> 
>> opinions ?
>>
>> re,
>

i think we should document that behaviour (either following sh or the current ash).
rob is writen a bbsh  and the results sould be comparable with the current ash.
even changes in ash should not break anything once a suite of testcases is defined
(POSIX may evolve and require changes).

re,
 wh








More information about the busybox mailing list