I want to get the arg of a command from a var that has the index in it of the arg that I want. Something like this
# command in terminal, `foo -r -f value_wanted` index="3" var=$"$index" echo $var ## expected output `value_wanted`
I know I can just call it by
$3 but that index I have is in the variable.