On 3 June 2016 at 17:32, Andreas Schwab <[email protected]> wrote:
> Gavin Smith <[email protected]> writes:
>
>> Apparently it should be \NEWLINE, where NEWLINE is a newline
>> character. Quoting is tricky, because \NEWLINE is interpreted as a
>> line continuation except in single quotes or if the backslash is
>> escaped. We are in single quotes, but those single quotes are within
>> backquotes.
>
> The latter is no longer an issue if you switch to $().

You're right:

$ echo '\
> x'
\
x

($ is main prompt, > secondary prompt.) The newline is output here.

Trying to wrap this command:

With $():

$ echo "$(echo '\
> x')"
\
x

This is the expected output.

Using `` instead:

$ echo "`echo '\
> x'`"
x

The \ has gotten lost somewhere.

Reply via email to