Friday, 23 August 2013

Quote a variable in shell script "if" statement

Quote a variable in shell script "if" statement

e.g.
if [ "$FOO" = "true" ]; then
vs
if [ $FOO = "true" ]; then
What is the different? Seems both of two statements also works.

No comments:

Post a Comment