3 ms·
It's strange how the quoting trick seems to work, even when double quotes appear in in a variable. For example: Ives ~ $ FN='"a b"' Ives ~ $ if [ "$FN"
by Ives 15y ago
It's strange how the quoting trick seems to work, even when double quotes appear in in a variable. For example:
Ives ~ $ FN='"a b"'
Ives ~ $ if [ "$FN" = '"a b"' ]; then echo "Does not matter"; fi
Does not matter
Still works fine, so clearly something more than simple variable expansion is going on here. It seems like the end-of-literal-string matching is performed before variable expansion.