On 06Apr2016 18:53, Jon LaBadie <[email protected]> wrote:
In the distant past constructions like that were needed because of a bug in the shells. If you had no arguments, "$@" was passed as "", a single null argument. Now it is correctly passed as no arguments.OT BTW I typically used ${@+"$@"} and playing with it after seeing this thread discovered a bug in handling it in ksh but not bash or zsh. Ksh only checks $1 for set/null rather than the entire list of args.
Got some demo code? The construction only tests $1 for set/null anyway, on the premise that that tests entire-list-of-args is empty/not-empty.
I don't think I understand your sentence. Thanks, Cameron Simpson <[email protected]>
