bash scripting : printing variable with the number within $i
I got this problem :
I want to print variable $1 to $n but for is not good enough in its current way, atleast how I use it :
for i in $(seq -w 1 9); do echo $$i; done
$i should give a number, but $$ is being done before so it's not good. I want it firstly to check what $i is and then do $ on the $i, if i=1 then $ $i = $1
How can I solve that?