On the command line you can declare an array as
# a=()
but in inside a script
#!/bin/sh
a=()
echo "length is ${#a[@]}"
it doesn't work.
# sh ./array.sh
./array.sh: 3: Syntax error: "(" unexpected
Is it possible to use arrays in scripts? How?