Your search may have yielded no result because (as steeldriver commented) you didn't escape the $
, try searching for \$@
and you'll find the following under man bash
– PARAMETERS – Special Parameters:
@ Expands to the positional parameters, starting from one. When
the expansion occurs within double quotes, each parameter
expands to a separate word. That is, "$@" is equivalent to "$1"
"$2" ... If the double-quoted expansion occurs within a word,
the expansion of the first parameter is joined with the
beginning part of the original word, and the expansion of the
last parameter is joined with the last part of the original
word. When there are no positional parameters, "$@" and $@
expand to nothing (i.e., they are removed).
Unquoted it gets expanded to $1 $2 $3 … ${N}
, quoted to "$1" "$2" "$3" … "${N}"
, which is what you want in most cases. This and the difference to $*
is very good explained in the bash-hackers wiki.
man
(which uses theless
pager by default) you will need to escape the$
character i.e.\$@
– steeldriver Mar 26 '18 at 12:33