I'm just curious what the 1+ does in this context. If there are actual arguments in "$@", the 1+ doesn't seem to modify the end result at all. So, if "$@" is empty, do we get instead the return value of the first positional parameter $1, which happens also to be empty? Or does the 1+ just act to clean up the return value of the empty "$@".
In reply to Re^2: what's the difference between "$@" and ${1+"$@"}
by cadphile
in thread what's the difference between "$@" and ${1+"$@"}
by cadphile
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |