I needed to write a script to enter multi-line input to a program (psql).
After a bit of googling, I found the following syntax works:
c
In your case, "EOF" is known as a "Here Tag". Basically <Here. You can name this tag as you want, it's often EOF or STOP.
Some rules about the Here tags:
example:
$ cat >> test < Hello world HERE <-- Not by itself on a separate line -> not considered end of string
> This is a test
> HERE <-- Leading space, so not considered end of string
> and a new line
> HERE <-- Now we have the end of the string