I\'m familiar with this syntax:
cmd1 << EOF | cmd2
text
EOF
but just discovered that bash allows me to write:
cmd1 &
Yes it's in the POSIX shell grammar. You can also have more than one here-doc for the same command (some other examples use two cat invocations, but this works as well):
cat <
This is contrived (using 2 here-docs for stdin), but if you think of providing input for different file descriptors it immediately makes sense.
There's also the possibility to drop the cat entirely. Why not make the here-document directly available to cmd:
cmd << EOF
input
here
EOF