Arc Forumnew | comments | leaders | submitlogin
4 points by bayareaguy 6165 days ago | link | parent

This is the common sh shell idiom to properly pass the original command line to the program being invoked.

"$0" expands to the program name ("ar.sh" in his example).

${1+"$@"} is conditional:

if $1 (the first positional parameter) is unset it expands to nothing.

however if $1 is set, it expands to "$@", which in turn expands to all the parameters, each one quoted as a separate word.



1 point by laughingboy 6165 days ago | link

Thank you.

-----