How to get the nth positional argument in Bash, where n is variable?
n
As you can see in the Bash by Example, you just need to use the automatic variables $1, $2, and so on.
$# is used to get the number of arguments.