I'm trying to access a positional parameter using a variable.
i.e. if I define a variable as 1, I want to access the 1st positional parameter, if I define it as 2 I want to access the 2nd positional parameter.
example: bash script.bash arg1 arg2 arg3
var=2
echo $var // will only echo no. 2
??? // insert your command to echo the 2nd positional parameter (arg2)
can this be done?