Skip to content
koalaman edited this page Jul 8, 2017 · 1 revision

Delete whitespace after the here-doc end token.

Problematic code:

"▭" below indicates an otherwise invisible space:

cat << "eof"
Hello
eof▭   

Correct code:

cat << "eof"
Hello
eof

Rationale:

The end token of your here document has trailing whitespace. This is invisible to the naked eye, but shells do not accept it.

Remove the trailing whitespace.

Exceptions:

None.

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature above to find a specific one, or see Checks.

Clone this wiki locally