I\'m writing a bash script which has set -u, and I have a problem with empty array expansion: bash appears to treat an empty array as an unset variable during e
set -u
The most simple and compatible way seems to be:
$ set -u $ arr=() $ echo "foo: '${arr[@]-}'"