I am learning shell script language. I write and run the code using Ubuntu terminal.I have declare an array with value like below..
arr=(1 2 3)
echo $(arr[0])
echo $(arr[1])
echo $(arr[2])
The above code doesn't run.Whenever I run using the terminal,I face error like below..
./a.sh: line 2: arr[0]: command not found
./a.sh: line 3: arr[1]: command not found
./a.sh: line 4: arr[2]: command not found
How can I solve it?