Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
16
rated 0 times [  16] [ 0]  / answers: 1 / hits: 2161  / 3 Years ago, mon, october 18, 2021, 2:10:16
~$ echo $''test'
'test


man bash says:




Enclosing characters in single quotes preserves the literal value
of each character within the quotes. A single quote may not occur between
single quotes, even when preceded by a backslash.




Why does it work in the echo-command then?


More From » bash

 Answers
5

Single quotes '...' are different to dollar single quotes $'...'. The former doesn't support any backslashing, while the latter uses the ANSI C specification.


[#5443] Tuesday, October 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
luringdge

Total Points: 3
Total Questions: 126
Total Answers: 109

Location: India
Member since Sun, Feb 6, 2022
2 Years ago
;