Quote:
|
But I'm puzzled about why in the second case $line has a newline suffixed ... ?
|
The here-string syntax (<<< "") appends a newline to the end. Internally, it actually creates a here-doc and passes that in, like
Code:
IFS="" read -r -d "" line << EOF
foo
EOF
(Note that there's three spaces after "foo")