I have an array which gets filled with different error messages as my script runs.
I need a way to check if it is empty of not at the end of the script and take a specific action if it is.
I have already tried treating it like a normal VAR and using -z to check it, but that does not seem to work. Is there a way to check if an array is empty or not in Bash?