On 07/20/10 14:15, Eric Blake wrote: > But for that to work, the token has to be more than a newline (since > read strips newlines).
Sorry, I don't follow. If read exits with status 0, it got a newline. If it exits with nonzero status, it did not get a newline. So there's an unambiguous way of telling whether 'read' got a newline.