Date: Mon, 21 Nov 2016 15:07:28 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 213510] csplit does not work any more Message-ID: <bug-213510-8-V8mAzGjxxw@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-213510-8@https.bugs.freebsd.org/bugzilla/> References: <bug-213510-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213510 Ross McKelvie <ross@exitzero.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ross@exitzero.uk --- Comment #2 from Ross McKelvie <ross@exitzero.uk> --- I have experienced the same issue and an additional issue with csplit on 11.0-RELEASE-p3. To replicate create a file called 'bigfile' with the contents: BEGINS Section One Text for section one. Section Two Text for section two. Section Three Text for section three. ENDS Run csplit: csplit bigfile '/Section/' '{1}' Expected result: 3 files: xx00, xx01 and xx02 each containing text for each section with a trailing newline; for example xx00: BEGINS Section One Text for section one. ENDS Actual result: 2 files: xx00 and xx01. xx00 is empty and xx01 contains the single line "Section One". Splitting by line number is also broken. Run csplit: csplit bigfile 4 7 Expected result: 3 files: xx00, xx01 and xx02 each containing text for each section with a trailing newline. Actual result: 3 files: xx00 containing the single line "Section One", xx01 containing the single line "Text here from section one" and xx02 containing a newline character. A potential workaround is instead using the split utility, for example: split -p 'Section' bigfile However, split does not offer the complexity of csplit and is not suitable = as a direct substitute. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-213510-8-V8mAzGjxxw>