Command line arguments
Command line arguments
positional parameters
arguments passed to the script from the command line: $0, $1, $2, $3 . . .
$0 is the name of the script itself, $1 is the first argument, $2 the second, $3 the third, and so forth. After $9, the arguments must be enclosed in brackets, for example:
${10}, ${11}, ${12}.
# /home/user/myscript.sh arg1 arg2 arg3 ... arg10
$0 = myscript.sh
$1 = arg1
$2 = arg2
$3 = arg3
${10} = arg10