#1029120 coreutils: csplit: handles {*} repetitions inconsistently

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
наб
Date:
2023-01-18 02:09:04 UTC
Severity:
normal
#1029120#5
Date:
2023-01-18 02:06:11 UTC
From:
To:
Dear Maintainer,

Consider the standard repetition:
-- >8 --
$ seq 999 | csplit - /10/1 {99}
21
271
8
8
8
8
8
400
400
400
400
400
400
400
400
csplit: ‘/10/1’: match not found on repetition 15
356
$ seq 999 | csplit - 88 {99}
252
340
352
352
352
352
352
352
352
352
352
csplit: ‘88’: line number out of range on repetition 11
128
-- >8 --

Good! POSIX agrees:
  An error shall be reported if an operand does not reference
  a line between the current position and the end of the file.
(the operand being /10/1 or 88, resp., as re-applied via {99}).

So why, then:
-- >8 --
$ seq 999 | csplit - /10/1 {*}
21
271
8
8
8
8
8
400
400
400
400
400
400
400
400
356
$ seq 999 | csplit - 88 {*}
252
340
352
352
352
352
352
352
352
352
352
csplit: ‘88’: line number out of range on repetition 11
128
-- >8 --

The manual defines {*} as
  {*}    repeat the previous pattern as many times as possible
but then inconsistently uses it as
  88    {∞}
  /10/1 {until no more matches}

Best,
наб