The `read` command
Read a line verbatim
$ IFS= read -r foo <<EOF
> this is a \n line
>EOF
$ printf '%s\n' "$foo"
this is a \n line
Read a line, stripping leading and trailing whitespace
$ read -r foo <<EOF
> this is a line
>EOF
$ printf '%s\n' "$foo"
this is a line