hi guys, i have an array called ARRAY which has elements in it... i am trying to assign elements of ARRAY to master_array.. i get a =: command not found error..
i=0 while [ $i -le 11 ] do ${master_array}=${ARRAY} ((i++)) done
is there something i am missing?
This may work:
i=0 while [ $i -le 11 ] do master_array=${ARRAY} ((i++)) done
ok thanks that worked!! so you dont use $ while assigning a variable with a value but use it on the rhs? sorry i am new to scripting..
$ is used to extract not to assign.
ok that helps..thanks