## Here Docs
[Here Documents](https://tldp.org/LDP/abs/html/here-docs.html)
> A *here document* is a special-purpose code block. It uses a form of [I/O redirection](https://tldp.org/LDP/abs/html/io-redirection.html#IOREDIRREF) to feed a command list to an interactive program or a command, such as [ftp](https://tldp.org/LDP/abs/html/communications.html#FTPREF), [cat](https://tldp.org/LDP/abs/html/basic.html#CATREF), or the *ex* text editor.
```sh
cat <<LimitString
command #1
command #2
…
LimitString
```
> Choose a *limit string* sufficiently unusual that it will not occur anywhere in the command list and confuse matters.
```sh
# The - option to a here document <<-
#+ suppresses leading tabs in the body of the document,
#+ but *not* spaces.
cat <<-ENDOFMESSAGE
This is line 1 of the message.
This is line 2 of the message.
This is line 3 of the message.
This is line 4 of the message.
This is the last line of the message.
ENDOFMESSAGE
# The output of the script will be flush left.
# Leading tab in each line will not show.
# Above 5 lines of "message" prefaced by a tab, not spaces.
# Spaces not affected by <<- .
# Note that this option has no effect on *embedded* tabs.
```
> A *here document* supports parameter and command substitution. It is therefore possible to pass different parameters to the body of the here document, changing its output accordingly.
> Quoting or escaping the “limit string” at the head of a here document disables parameter substitution within its body.
## Here Strings
[Here Strings](https://tldp.org/LDP/abs/html/x17837.html)
> A *here string* can be considered as a stripped-down form of a *here document*.
> It consists of nothing more than **COMMAND <<< $WORD**,
> where `$WORD` is expanded and fed to the stdin of **COMMAND**.
## Read
Use the `read` command to read a prompt.