SyntaxFix
Write A Post
Hire A Developer
Questions
Of course it does. After replacing the variable, it reads [ !-z ], which is not a valid [ command. Use double quotes, or [[.
[ !-z ]
[
[[
if [ ! -z "$errorstatus" ] if [[ ! -z $errorstatus ]]