[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible bug when combining Bash's process substitution with HERE-do

From: Tim Friske
Subject: Re: Possible bug when combining Bash's process substitution with HERE-document?
Date: Fri, 20 Jun 2014 00:00:02 +0200


first I want to thank you for your help.

While searching for an alternative I came up with the following code
which does not work when I have the "shopt -os errexit" command line
at the top of my script:

read -d '' -r foobar <<BARFOO
bla bla

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

Do you know a solution?


2014-06-18 22:35 GMT+02:00 Chet Ramey <address@hidden>:
> On 6/18/14, 4:27 PM, Dan Douglas wrote:
>> On Wed, Jun 18, 2014 at 2:49 PM, Chet Ramey <address@hidden> wrote:
>>> Yes, since bash can parse the same construct without any problems if you
>>> use command substitution, it looks like a bug.  I'll take a look.
>> It brings to mind all those unbalanced paren case..esac bugs that
>> affected every shell ever.
>> I suppose this might qualify as a bug too?
> Yes, with the same fix.
> Chet
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]