bug-bash
[Top][All Lists]
Advanced

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

Re: Wrong line numbers in errors


From: Chet Ramey
Subject: Re: Wrong line numbers in errors
Date: Sat, 3 Feb 2024 12:54:00 -0500
User-agent: Mozilla Thunderbird

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    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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