I was trying to execute new line using echo and tried following two commands:First command:echo $'Hello World\nThis is a new line'Response:Hello WorldThis is a new lineSecond command:echo $Hello World\nThis is a new lineResponse:Hello World\nThis is a new lineMy question is what's the difference between string wrapped with $' ' vs string wrapped with $  in bash's echo?
What is the difference between single quoted $'string' and double quoted $string in bash?
bash;quoting;echo
As explained here, the syntax $'string' specifies a C-style string which includes magic escaped characters, such as \n for a newline.  $string is for I18N expansion, which has no such magic escapes.Note that these are distinct from the more common string (weak quoting) and 'string' (strong quoting).