Heredoc Удалить вкладки ведущие пространства Linux Bash
If you don't need command substitution and parameter expansion inside your here-document, you can avoid using tabs by adding the leading spaces to the delimiter:
$ cat << ' EOF'
> indented
> EOF
indented
$ cat << ' EOF' | sed -r 's/^ {8}//'
> unindented
> EOF
unindented
DreamCoder