From 8094cf9f38fc7b9e2f4f0cabf889724e96bdc516 Mon Sep 17 00:00:00 2001 From: koalaman Date: Thu, 3 Sep 2015 20:41:09 -0700 Subject: [PATCH] Created SC1038 (markdown) --- SC1038.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 SC1038.md diff --git a/SC1038.md b/SC1038.md new file mode 100644 index 0000000..6685534 --- /dev/null +++ b/SC1038.md @@ -0,0 +1,25 @@ +## Shells are space sensitive. Use '< <(cmd)', not '<<(cmd)'. + +### Problematic code: + + while IFS= read -r line + do + printf "%q\n" "$line" + done <<(curl -s http://example.com) + +### Correct code: + + while IFS= read -r line + do + printf "%q\n" "$line" + done < <(curl -s http://example.com) + +### Rationale: + +You are using `<<(` which is an invalid construct. + +You probably meant to redirect `<` from process substitution `<(..)` instead. To do this, a space is needed between the `<` and `<(..)`, i.e. `< <(cmd)`. + +### Exceptions: + +None. \ No newline at end of file