# cat test.sh #!/bin/sh echo ${#var} if [ -n $var ] then echo InIf fi # ./test.sh 0 InIf #