I'm having what seems like a pretty simple problem that I can't seem to fix, and the only help I'm getting from bash is that it's a bad substitution. Any help?
#!/bin/bash
lang=Python
frameworks=('Python=(Django Flask Pyramid)' 'Ruby=(Rails Cuba)')
for i in "${frameworks[@]}";do eval $i;done
echo "Python ${#$lang[@]} ${$lang[@]}"
echo "Ruby ${#Ruby[@]} ${Ruby[@]}"
Line 5 above is what throws the error, but line 6 works perfectly, which should do the same thing?
Output:
>>>line 5: Python ${#$lang[@]} ${$lang[@]}: bad substitution
>>>Ruby 2 Rails Cuba