On 3/8/19 7:18 PM, Grisha Levit wrote:
> On Tue, Mar 5, 2019 at 11:26 AM Chet Ramey <[email protected]> wrote:
>> This is still a WIP, keep the test cases coming.
>
> bash removes the surrounding space in these cases (all other shells
> print `< X >'):
Thanks for the report.
>
> IFS=; set -- X
> printf "<%s>" ${0+ "$@" }
> <X>
> printf "<%s>" ${0+ $@ }
> <X>
> printf "<%s>" ${0+ $* }
> <X>
It has to do with $@ and $* and null IFS; any other combination works fine.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/