diff --git a/SC1118.md b/SC1118.md new file mode 100644 index 0000000..edd4498 --- /dev/null +++ b/SC1118.md @@ -0,0 +1,28 @@ +## Delete whitespace after the here-doc end token. + +### Problematic code: + +"▭" below indicates an otherwise invisible space: + +```sh +cat << "eof" +Hello +eof▭ +``` + +### Correct code: + +```sh +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. \ No newline at end of file