What is a here-string (`<<<`)?
IntermediateConceptArguments, I/O, here-docs, process substitution and subshells
Answer
cmd <<< "string" sends a single string (plus a trailing newline) to stdin, without echo | and without a pipeline subshell.
read -r major minor patch <<< "${version//./ }"
jq -r '.status' <<< "$response"
grep -q '^ERROR' <<< "$output" && alert
It is Bash-only (not POSIX sh).
More on Arguments, I/O, here-docs, process substitution and subshells
How does `getopts` work? Show a complete example.IntermediateWhat is the difference between `getopts` and `getopt`?AdvancedExplain file descriptors 0, 1 and 2 and the main redirection operators.BeginnerWhy is `cmd 2>&1 > file` different from `cmd > file 2>&1`?AdvancedWhat is a here-document, and what is the difference between `<<EOF`, `<<'EOF'` and `<<-EOF`?BeginnerHow do you send a here-doc to a remote server over SSH, and when should variables expand locally vs remotely?Advanced