you could try chet ramey or the bash mailing list... he joins in a lot of the shell discussions on the POSIX mailing list.
On Fri, Mar 6, 2020 at 4:03 AM Rob Landley <[email protected]> wrote: > > Is it just me, or is bash's unquoted $@ processing with a non-whitespace IFS > only retaining blank arguments when they're followed by another argument (even > if that one is blank)? > > $ func() { bash -c 'IFS=x; for i in $@; do echo =$i=; done' blah "$@"; } > $ func one "" two > =one= > == > =two= > $ func one "" > =one= > $ func "" two > == > =two= > $ func "" "" > == > > (I mean, it could be worse. Busybox ash is _never_ retaining zero length > arguments here. But I'm trying to figure out what logic bash is using, and not > finding a coherent design idea. Is this a bug, or did they mean to do it? If > they meant it, _why_?) > > Rob > > P.S. I dug up bash 2.05b and at least it's been CONSISTENT for 18 years, so I > guess that's something? But... why? > > P.P.S. As far as I can tell, $@ and $* behave the same unquoted, and that's > the > codepath I'm currently trying to implement. > _______________________________________________ > Toybox mailing list > [email protected] > http://lists.landley.net/listinfo.cgi/toybox-landley.net _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
