On 6/19/14, 6:00 PM, Tim Friske wrote:

> When I try to explicitly return success in case read fails because of
> EOF the script indefinitely waits:
> 
> read -d '' -r foobar || true <<BARFOO
> bla bla
> BARFOO

You have constructed a command where `read' will wait forever for terminal
input and `true' will run with a here-document as its input.  Change the
first line to

read -d '' -r foobar <<BARFOO || true

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to