xxxxxxxxxx
#!/bin/bash
# Loop through all the arguments
for arg in "$@"; do
echo "Argument: $arg"
done
xxxxxxxxxx
# print all arguments:
#!/bin/bash
echo $@
# If you intend to do something with your arguments within a script:
#!/bin/bash
for i; do
echo $i
done
xxxxxxxxxx
$ myscript.sh first_arg second_arg
# myscript.sh
#!/bin/bash
echo $1 # output: first_arg
echo $2 # output: second_arg