]> git.ipfire.org Git - thirdparty/coreutils.git/commit
csplit: fix regex suppression with specific match count
authorEmanuele Giacomelli <vpooldyn-linux@yahoo.it>
Sat, 8 Aug 2020 20:29:13 +0000 (21:29 +0100)
committerPádraig Brady <P@draigBrady.com>
Sat, 8 Aug 2020 20:50:13 +0000 (21:50 +0100)
commit7cf45f4f6a093a927d3139c87f52999dd2c750ec
tree08820d94ad0f7ef7caa367235433fdd7afd9b62f
parentc0e5f8c59b951ae13ca9cb9945cd77163489e1d9
csplit: fix regex suppression with specific match count

* src/csplit.c (process_regexp): Process the line suppression
in all invocations so that the last match is suppressed.
Previously with a non infinite match count,
the last regex pattern was not suppressed.
* NEWS: Mention the bug fix.
* tests/misc/csplit-suppress-matched.pl: Add a test case.
Fixes https://bugs.gnu.org/42764
NEWS
src/csplit.c
tests/misc/csplit-suppress-matched.pl