[trying to re-send since the previous efforts gave a delivery failure]
Running 6.9 + syspatches. To reproduce
$ printf 'boundary\n%i\n' $(jot 5) | csplit -k - /boundary/ '{999}'
11
11
11
11
csplit: boundary: no match
$ ls -lsF
total 20
4 -rw-r--r-- 1 tim tim 11 Dec 18 17:49 xx00
4 -rw-r--r-- 1 tim tim 11 Dec 18 17:49 xx01
4 -rw-r--r-- 1 tim tim 11 Dec 18 17:49 xx02
4 -rw-r--r-- 1 tim tim 20 Dec 18 17:49 xx03
4 -rw-r--r-- 1 tim tim 11 Dec 18 17:49 xx04
$ cat xx02
boundary
3
$ cat xx03
boundary
4
boundary
$
Note that the next-to-last file emits the matching boundary both at
the beginning and the end (the file also stands out as being 20 bytes
rather than 11 bytes) when it should only emit the first boundary.
It looks like this bug happened in FreeBSD's csplit(1) too
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=163062
but has been fixed over on the FreeBSD side of things (diff available
at that URL) so you may be able to pull that in.
_________________________________________________
Working with Todd Miller on Twitter, it sounds like he has already
pulled in this change, but trying to email again so that the
breaking test-case is in the history of bugs@
(and if this re-attempt to email comes through, my many thanks to him
for poking the right bits to accommodate my hosting service's strange
mail configuration)
-tkc