The bash man page says the following about the readread builtin:
The exit status is zero, unless end-of-file is encountered
This recently bit me because I had the -e option set and was using the following code:
read -rd '' json <<EOF
{
"foo":"bar"
}
EOF
I just don't understand why it would be desirable to exit non successfully in this scenario. In what situation would this be useful?