[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: csplit - split by content of field

From: Pádraig Brady
Subject: Re: csplit - split by content of field
Date: Thu, 07 Feb 2013 16:39:03 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 02/07/2013 03:02 PM, Assaf Gordon wrote:
Pádraig Brady wrote, On 02/06/2013 05:38 PM:
On 02/06/2013 10:09 PM, Assaf Gordon wrote:

Attach is a patch that gives 'csplit' the ability to split files by content of 
a field.

Yes such a feature is useful, though maybe in conjuntion with uniq:

So basically the proposal there is to support --suppress-matched
so that you could then do:

uniq -w1 --unique=separated --all-repeated=separated |
csplit --suppress-matched '/^$/' '{*}'

The caveat with that though is that uniq would
benefit from better field selection, which is
also on the TODO list.

uniq with fields is indeed useful, but the example above seems a bit long for 
something that can be acheived natively with just csplit (IMHO) - what do you 
think ?

My first reaction was I was wary about adding field processing to csplit.
Though I've not thought much about it.
I'll think a bit more when I have time.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]