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

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -