I am confused in bash by this expression:
$ var=\"\" # empty var $ test -f $var; echo $? # test if such file exists 0 # and this file exists, amazing! $ test
When var is empty, $var will behave differently when if quoted or not.
var
$var
test -f $var # <=> test -f ==> $? is 0 test -f "$var" # <=> test -f "" ==> $? is 1
So this example tells us: we should quote the $var.