Interview Prep/Shell Scripting/Arguments, I/O, here-docs, process substitution and subshells

What is a here-string (`<<<`)?

IntermediateConceptArguments, I/O, here-docs, process substitution and subshells
Answer

cmd &lt;&lt;&lt; "string" sends a single string (plus a trailing newline) to stdin, without echo | and without a pipeline subshell.

read -r major minor patch &lt;&lt;&lt; "${version//./ }"
jq -r '.status' &lt;&lt;&lt; "$response"
grep -q '^ERROR' &lt;&lt;&lt; "$output" && alert

It is Bash-only (not POSIX sh).

All Shell Scripting questions Roadmap: Shell scripting (Bash)

More on Arguments, I/O, here-docs, process substitution and subshells