Skip to content
RED SAG Skills
hard20 pts · first answer countslinuxbashquoting

unary operator expected

This line fails with "[: =: unary operator expected" when STATUS is empty. Why, and what is the fix?

if [ $STATUS = "ok" ]; then echo up; fi
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions