Yes, if you do it literally like in your post.
You have to keep in mind that heredoc terminators cannot be indented unless the heredoc is started using <<-EndOfOutput (the dash indicates that all leading tabs – not any whitespace, but only tabs – should be stripped).
| Works |
Also works |
Fails |
Works with tabs only |
{ cat <<End $o1 $o2 End } | column |
{ cat <<End $o1 $o2 End } | column |
{ cat <<End $o1 $o2 End } | column |
{ cat <<-End $o1 $o2 End } | column |
So the version you've posted without any indentation actually works perfectly fine on all shells; it's when you indent it to look nice that you would get the error.
Of course, you could save you some trouble by not using the brackets (the heredoc can be opened in the middle of a line) – or, by not having a pipe in there at all:
| Works |
Works |
Works |
cat <<End | column $o1 $o2 End |
column <<EndOfOutput $o1 $o2 EndOfOutput |
<<EndOfOutput column $o1 $o2 EndOfOutput |
(Heredocs are a shell-syntax feature so they don't require cat specifically.)