On 2/3/24 8:36 AM, Matthias Urlichs via Bug reports for the GNU Bourne Again SHell wrote:
Version 5.2.15

see example script below, the unassigned $nope is reported to be in line 4 which is obviously wrong. Removing the parentheses around the echo fixes the problem.

#!/bin/bash
set -u
( echo x ) | while read f ; do
     echo Test $f
     echo Test $f
     echo Test $f
     echo Test $f
     echo Test $f
done
echo $nope

Thanks for the report. This was fixed in September, 2022, the result of
https://savannah.gnu.org/support/index.php?110714 .


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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

  • Wrong line... Matthias Urlichs via Bug reports for the GNU Bourne Again SHell
    • Re: W... Chet Ramey
      • R... Matthias Urlichs via Bug reports for the GNU Bourne Again SHell
        • ... Chet Ramey

Reply via email to