0

Why is this not possible?

        #!/bin/bash
        for (( j=1; j<=1; j++))
        do 
            DAA_$j=`echo A`
        done

I have already read Command not found error in Bash variable assignment. But the answer I am looking for is not in there.

Charles Duffy
  • 280,126
  • 43
  • 390
  • 441
Another.Chemist
  • 2,386
  • 3
  • 29
  • 43
  • Generally, it's better form to ask "how can I do X?" than "why does the syntax I made up/guessed at intending that it do X (but without any supporting documentation/specification behind that assumption) not work?" – Charles Duffy Nov 06 '17 at 22:30
  • ...here, the "X" you're trying to accomplish (assigning to a variable name with a variable substituted into it) is implicit (described in your code, but never in the surrounding prose) -- but if you'd put that into your title, you might have had a duplicate presented by the site before even posting the question! – Charles Duffy Nov 06 '17 at 22:38

0 Answers0