1
0
mirror of https://github.com/koalaman/shellcheck.git synced 2025-01-04 18:19:54 -08:00

Created SC1038 (markdown)

koalaman 2015-09-03 20:41:09 -07:00
parent 972a243669
commit 8094cf9f38

25
SC1038.md Normal file

@ -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.