1 SC1118
koalaman edited this page 2017-07-08 14:27:58 -07:00

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.