From owner-freebsd-bugs@freebsd.org Mon Nov 21 15:07:28 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1753C4D097 for ; Mon, 21 Nov 2016 15:07:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7778EE60 for ; Mon, 21 Nov 2016 15:07:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uALF7Ssl002945 for ; Mon, 21 Nov 2016 15:07:28 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 213510] csplit does not work any more Date: Mon, 21 Nov 2016 15:07:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ross@exitzero.uk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 15:07:28 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213510 Ross McKelvie changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ross@exitzero.uk --- Comment #2 from Ross McKelvie --- 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.=