0

I was wondering about the difference of ' and " behavior with \\.

$ echo "\\"
\
$ echo '\\'
\\
$ echo \\
\

Why is that ?

bob dylan
  • 1,832
  • 3
  • 20
  • 31
  • 1
    Note that whether `echo '\\'` (the only one where `echo` is being passed \\ as argument) outputs one or too backslashes depends on the `echo` implementations and in the case of bash's builtin `echo` whether the `xpg_echo` option has been enabled or not (at runtime or build time). – Stéphane Chazelas Sep 02 '22 at 06:16

0 Answers0