bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH] examples/s-f/Bash_aliases: Fix off-by-one error


From: Chet Ramey
Subject: Re: [PATCH] examples/s-f/Bash_aliases: Fix off-by-one error
Date: Mon, 22 Sep 2025 10:03:31 -0400
User-agent: Mozilla Thunderbird

On 9/20/25 11:20 AM, Lawrence Velázquez wrote:

And, if I were doing this, I'd get rid of "seq" completely (*) and just
code the loop in "repeat" as:

     for ((i=1; i<=count; i++)); do

(*) Thereby eliminating the "shadowing" issue.

This was my first thought as well.  I doubt bash 1.x compatibility
is really a concern anymore.

Well, how about we just remove them from the Bash_aliases file and provide
a modern version of `repeat' in the examples/functions subdirectory.

--
``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]