Only thing I can recommend (as well as for literally any script) is using set -u. Only because it's awful to debug unset variables and there's never a use case for using unset variables.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments