On Sat, Sep 20, 2025, at 9:03 AM, Stan Marsh wrote: > Regarding the fundamental question of "Is this a bug or not?", note that > in computer stuff, yeah, most people's intuitive idea of what "repeat n > times" means is "Do it n times". And most implementations I've seen of > a "repeat" keyword in programming have meant that. Didn't Pascal have a > "repeat" command?
Pascal does have a repeat/until loop, but it uses an expression, not a number. https://www.freepascal.org/docs-html/ref/refsu60.html The most relevant analogs are the `repeat' commands in csh and zsh (the latter likely learned it from the former), which execute the given command or list n times. > 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. -- vq
