if statement - Test for a dot in bash -
how can test if string dot in bash? i've tried this:
if [ "$var" = "." ]
and this:
if [ "$var" = "\." ]
but doesn't work.
works me:
$ d=. $ if [ $d = '.' ];then echo 'yes'; else echo 'no'; fi yes $ d=foo $ if [ $d = '.' ];then echo 'yes'; else echo 'no'; fi no
Comments
Post a Comment