echo "\*" has the exact same output as
\*. I am using GNU bash 5.2.15.
echo "\\*" to output
\*, but I do not know why
echo "\*" did too. To my knowledge it should have gone a bit like this:
- Bash sees:
- Bash processes double quotes, leaving the backslash unescaped:
- Bash escapes
- Bash prints
My suspicion lies in 3. I believe that the backslash does not escape the
* because it is already escaped in 2. Is this correct?
\is removed only if it was unquoted. In this case it is quoted, so it won't be removed.
$symbols on the front of
echo? If they're a prompt then your shell won't see that - it printed it for you
echo \\\zoutput \z?