In bash-4.3 and prior, it was possible to use ${!var:-} to reference the variable whose name is stored in var indirectly, whilst not returning an unbound variable error if nounset is enabled.
bash-4.4 removes this: the above syntax is no longer valid and the only way to safely reference a possibly-unset indirect variable is to either disable nounset or to eval the check/assignment.
Further, ${#array[@]:-} is no longer accepted syntax - need to check wether nounset breaks if referencing ${#array[@]} when array is unset or empty.
In bash-4.3 and prior, it was possible to use
${!var:-}to reference the variable whose name is stored invarindirectly, whilst not returning anunbound variableerror ifnounsetis enabled.bash-4.4 removes this: the above syntax is no longer valid and the only way to safely reference a possibly-unset indirect variable is to either disable
nounsetor to eval the check/assignment.Further,
${#array[@]:-}is no longer accepted syntax - need to check wethernounsetbreaks if referencing${#array[@]}whenarrayis unset or empty.