GNU bug report logs - #8796
I need help piping csplit

Previous Next

Package: coreutils;

Reported by: Julio Cesar Gonzalez Torres <bettlebog <at> gmail.com>

Date: Fri, 3 Jun 2011 19:51:01 UTC

Severity: normal

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 8796 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: 8796 <at> debbugs.gnu.org
Subject: Re: bug#8796: I need help piping csplit
Date: Fri, 03 Jun 2011 16:27:59 -0600
[Message part 1 (text/plain, inline)]
On 06/03/2011 03:44 PM, Eric Blake wrote:
> But csplit is documented as requiring a single file name, followed by
> multiple patterns.
> 
> What you WANT to do is:
> 
> find . -name '*out' | \
>   xargs -I{} csplit {} '/All Frequencies/' '/Statistical'/

Or, ditch xargs altogether, and do it all through find:

find . -name '*out' -exec csplit {} "/All Frequencies/" /Statistical/ \;

which has the added benefit of avoiding problems with any *out files
that have embedded newlines.

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 13 years and 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.