逐字读一行

$ IFS= read -r foo <<EOF
>     this is a \n line
>EOF
$ printf '%s\n' "$foo"
    this is a \n line