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

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -