Bash symbols: $@
12 December 2025 (Updated 12 December 2025)
$@ gives you all the arguments passed to the script or function.
For example, if you have this code:
./my-script.sh one two three
Inside my-script.sh, you can loop over the arguments like this:
for arg in $@; do
echo "arg: $arg"
done
Tagged:
Bash