On 12/11/25 10:27 PM, Grisha Levit wrote:
On Thu, Dec 11, 2025, 20:00 <[email protected]> wrote:

## One liner to reproduce the bug on fedora42:

$ f=~/f; echo color: red > $f; foo=$( awk '/^color: / {print $2}' ~/f );set 
-x;cat
+ cat
cat: -: input file is output file

This seems like the result of known bugs in cat [1] and gawk [2] and
not a bug in bash.

I'm leaning towards this explanation, since this only happens with gawk,
and not, for instance, /bin/echo. If bash were corrupting file descriptors,
it would be doing it for every external command.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to