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 09:55:13 -0400
User-agent: Mozilla Thunderbird

On 9/19/25 7:01 PM, Gioele Barabucci wrote:
From: Nicolas Aupetit <nicolas.aupetit+reportbug@ebzao.info>

The `repeat` function calls the provided command one time too many:

     repeat 10 echo "foo" | wc -l ⇒ 11

Wow, software archaeology. This function has sat undisturbed since late
1990.

Also, the provided `seq` function shadows `/usr/bin/seq`.

Long before there was an external `seq' command.

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