Chris Angelico wrote:
+cat <<'EOM'
What I've always used (since the dawn of time), is cat <<\EOM Which is perfectly portable, backward and forward from 1985 to 2014 and back.
Yes, that version is portable, but it's slightly different. Putting the end marker in single quotes makes the entire string unparsed, same as a single-quoted string would otherwise be.
I'd beg to differ. <<'EOM' and <<\EOM should be identical in behaviour. AFAIK *any* kind of quoting of the marker behind << will result in the behaviour you describe.