I've been revising the IFS stuff around here and there and could in no way explain the behaviour of different code snippets that boils down to this:
$ read -r < <(printf "%s\n" " x ") && echo \<"$REPLY"\>
< x >
$ read -r line < <(printf "%s\n" " x ") && echo \<"$line"\>
<x>
Of course man bash
has it all.
If no names are supplied, the line read is assigned to the variable REPLY. The return code is zero, unless end-of-file is encountered, read times out (in which case the return code is greater than 128), a variable assignment error (such as assigning to a readonly variable) occurs, or an invalid file descriptor is supplied as the argument to -u.
I just thought it would be nice if one of those IFS-related answers contained a word on this casus. Some are even openly wrong, as it turns out. One example is the edit in this paragraph from this answer:
IFS is not used by read unless it is called with arguments. (Edit: This is not exactly true: whitespace characters, i.e. space and tab, present in IFS are always ignored at the beginning/end of the input line. )
This is a rhetorical question with no question mark. But correct me if I'm wrong, etc.
<x>
in both cases.