you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 2 years ago (2 children)

You could write that as 1 line:

[ -z "$var" ] && echo "empty" || echo "no it aint"

  • source
  • parent
  • hideshow 2 child comments