[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8796: I need help piping csplit
From: |
Eric Blake |
Subject: |
bug#8796: I need help piping csplit |
Date: |
Fri, 03 Jun 2011 16:27:59 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 |
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 address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature