Why does double brackets notation escape strings in bash? -
given following example code:
var="foo" if [[ ${var} != 'bar' ]]; then... if run piece of code in bash debug mode (bash -x), reads out follows:
[[ foo != \b\a\r ]] it still passes correctly, why show escapes? there better way this?
set -x ignores particular method of escaping , quoting, , constructs own equivalent representation of strings. shouldn't care exact format.
'bar' , \b\a\r encodes exact same string, , that's matters.
Comments
Post a Comment