bug-bash
[Top][All Lists]
Advanced

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

Re: Subsequent Here Doc/String Never Evaluated in Process Substitution


From: Martin D Kealey
Subject: Re: Subsequent Here Doc/String Never Evaluated in Process Substitution
Date: Sun, 30 Oct 2022 16:05:23 +1000

On Fri, 28 Oct 2022 at 20:37, <admin@nosuck.org> wrote:

> Thank you for the awesome shell.  I noticed the following after upgrading
> from 5.1.16-3 to 5.2.2-2 on Fedora.  It actually resulted in a minor
> amount
> of data loss.


After fixing the attached file to remove the carriage returns, I was able
to reproduce the fault using Bash v5.2.0 rc2

Running with « bash-5.2.0-r2 -x ConsecutiveHereDocStringBug », it appears
that the "cat" on the line following the assignment to uS is subsumed into
it, and then the redirection on the assignment is ignored.

(I discovered this when I attempted to insert « printf HERE\\n >&2 »
between the assignment and the cat, only to then see HERE\n: command not
found.)

Indeed, it appears that the command following the "do" always absorbs the
first word from the second command, despite the line break between them.

This does seem like a fairly serious issue if it's present in the 5.2.0
release.

-Martin


reply via email to

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