I am trying this in GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
:
$ echo <<EOF | cat
> 1
> 2
> 3
> EOF
I would have expected three lines of output (with 1
, 2
, 3
), but I receive an empty line. What am I missing (probably a simple mistake)? I am aware that this particular output can be produced in a simpler way; the example should serve as blueprint for a more substantial application.