Unexpected behaviour: double backslash in single quotes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Escape sequences don't work in single quotes:

$ echo 'hello\world'
hello\world
$ echo 'hello\'
hello\

Which makes it surprising that double backslashes get converted to single backslashes:

$ echo 'hello\\world'
hello\world

Is this intended behaviour? Bash behaves as I would have expected.



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux