From 93ff68371548ea945d488dd4f4a24e5d278e1019 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sat, 8 Jul 2017 14:27:58 -0700 Subject: [PATCH] Created SC1118 (markdown) --- SC1118.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 SC1118.md 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