Subject: bug#8796: I need help piping csplit

From: Eric Blake <[email-masked]>
Date: Fri, 03 Jun 2011 16:27:59 -0600

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   [email-masked]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org