Shell script variable problem
I am trying to write a shell script to automate things for me. But I'm stuck now. Here's the problem:
I have a variable named var1 (decreasing number from 25 to 0 and another variable named var $ {var1} and this matches some string. Then when I try to call var $ {var1} anywhere in the script via echo it suffers I tried $ [var $ var1], $ {var $ var} and many others, but every time it fails and gives var1 or says expected operand error. Thanks for your help.
+2
a source to share
3 answers