in reply to what's the difference between "$@" and ${1+"$@"}
My /(ba)?sh/-fu is notoriously weak, so I referred to the bash manual:
3.5.3 Shell Parameter Expansion ${parameter:+word} If parameter is null or unset, nothing is substituted, otherwise the expansion of word is substituted.
I take that to mean that if argument $1 (ie. ${1}) is null, nothing gets substituted, but if not, it's replaced by all arguments. In other words, perhaps it's a clean way of referring to all arguments, and not failing if none are specified? That's my best guess, anyway.
|
|---|