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: Lawrence Velázquez
Subject: Re: [PATCH] examples/s-f/Bash_aliases: Fix off-by-one error
Date: Mon, 22 Sep 2025 10:14:11 -0400

On Mon, Sep 22, 2025, at 10:03 AM, Chet Ramey wrote:
> 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.

That sounds very sensible to me.

-- 
vq



reply via email to

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