$ 0 0 the entire if-then and -z are unnecessary. [ "$foo" ] && echo "foo is not empty" [ "$foo" ] || echo "foo is indeed empty"