$@ is almost the same as $* , which means "all command line arguments." They are often used to simply pass all arguments to another program (thus forming a wrapper around this other program).
The difference between these two syntaxes is manifested when you have an argument with spaces in it (for example), and you put $@ in double quotes:
wrappedProgram "$@"
Example: Call
wrapper "one two three" four five "six seven"
will result in:
"$@": wrappedProgram "one two three" four five "six seven" "$*": wrappedProgram "one two three four five six seven" ^^^^ These spaces are part of the first argument and are not changed. $*: wrappedProgram one two three four five six seven
Alfe Apr 3 2018-12-12T00: 00Z
source share