2

This:

cat <<EOF
one
two
three
EOF

Prints:

one
two
three

And this:

cat <<EOF
one \\
two \\
three
EOF

Prints:

one \
two \
three

But while this:

cat <(
cat <<EOF
one
two
three
EOF
)

Prints:

one
two
three

This:

cat <(
cat <<EOF
one \\
two \\
three
EOF
)

Prints:

one \two \three

What's going on? Why are the newlines disappearing in this situation?

Tom Anderson
  • 936
  • 2
  • 7
  • 20
  • 1
    Similar to [What does POSIX require for quoted here documents inside command substitution?](https://unix.stackexchange.com/q/340923/22142) (probably the same bug or similar...) – don_crissti Nov 19 '18 at 13:13
  • That has been solved in bash 5.0. –  Nov 21 '18 at 06:00

0 Answers0