From a4a13ada878dbfab78821ed5b393e329782035c0 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sat, 8 Jul 2017 15:16:18 -0700 Subject: [PATCH] Created SC1122 (markdown) --- SC1122.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 SC1122.md diff --git a/SC1122.md b/SC1122.md new file mode 100644 index 0000000..6d2aa85 --- /dev/null +++ b/SC1122.md @@ -0,0 +1,28 @@ +## Nothing allowed after end token. To continue a command, put it on the line with the `<<`. + +### Problematic code: + +```sh +cat << EOF +Hello +EOF | nl +``` + +### Correct code: + +```sh +cat << EOF | nl +Hello +EOF +``` +### Rationale: + +You have a here document, and appear to have added text after the terminating token. + +This is not allowed. If it was meant to continue the command, put it on the line with the `<<`. + +If it helps, look at << "END" as if it was < file, and make sure the resulting command is valid. This is what the shell does. You can then append here document data after the command. + +### Exceptions: + +None \ No newline at end of file