São os parâmetros atuais do script de shell ou da função, citados individualmente.
man bash
diz:
@
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" ...
Dado o seguinte script:
#!/usr/bin/env bash
function all_args {
# repeat until there are no more arguments
while [ $# -gt 0 ] ; do
# print first argument to the function
echo $1
# remove first argument, shifting the others 1 position to the left
shift
done
}
echo "Quoted:"
all_args "$@"
echo "Unquoted:"
all_args $@
Isso acontece quando executado:
$ ./demo.sh foo bar "baz qux"
Quoted:
foo
bar
baz qux
Unquoted:
foo
bar
baz
qux