I have a loop over variable names and I need to check if content of a variable is an array or not:
for varname in AA BB CC; do
local val
if [ "$varname" is array ]; then # how can I perform this test?
echo do something with an array
else
echo do something with a "'normal'" variable
fi
done
How do I do it?
According to this wiki page, you can use this command: