3 SC1038
Joachim Ansorg edited this page 2021-11-12 10:32:29 +01:00

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.