: ${my_parameter:=()}
sets my_parameter to the () string instead of an empty array but I want an empty array.
: ${my_parameter:=()}
sets my_parameter to the () string instead of an empty array but I want an empty array.
You can run the following:
declare -a my_parameter
If my_parameter is an existing array, it is left untouched. Otherwise a new and empty array named my_parameter is created.