The following works in bsd unix, bash shell:
stuff=$(echo "dog cat rat")
read -r -a astuff <<< "$stuff"
for file in "${astuff[@]}"; do echo "file=$file"; done
Clearly the line containing <<<
breaks $stuff
into an array and puts the array into astuff. But I do not understand the syntax. Is there a man page or other documentation for <<<
? And how does this break the string at spaces?