Hi,
I have to use array in shell script to perform a logic. When I use below statements inside a script and execute, it gives me an error:
$ cat test.sh
set -A arr 10 20 30
echo ${arr[0]}
$ sh test.sh
a: -A: bad option(s)
But at the same time I can run above two statements without error outside the script on shell. I have tried a lot but don't get it. Can someone pls help me?
Thanks