I have the following system variables:
$var01="this is var01"
$var02="this is var02"
$var03="this is var03"
$Var04="this is var04"
I want to use a for loop to recall each of them:
for i in {0..4}
do
echo "content of var$i is: $[var$i]"
done
but the above for loop gives me an error saying "bad substitution". How should I construct echo parameter so to get the following result:
content of var01 is: this is var01
content of var02 is: this is var02
content of var03 is: this is var03
content of var04 is: this is var04