I have a problem with a bash script.
I would like to insert a variable into another variable in a bash script, but the risult is not what I should expect.
Here the code
input1="inputnumber1"
input2="inputnumber2"
input3="inputnumber3"
dummy="input"
for i in $(seq 1 3)
do
toprint=$dummy$i
echo "$toprint"
done
I would expect this code print the content of the variable $input1, $input2 and $input3, but it just print input1, input2 and input3.
Any suggestion?
Thanks in advance.
{1..3}instead of seq