On 02/07/2013 04:39 PM, Pádraig Brady wrote: > 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: >>> http://lists.gnu.org/archive/html/coreutils/2011-03/msg00000.html >>> >>> 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.
I think it's better to just add better field processing to uniq, and add a --suppress-matched option to csplit. thanks, Pádraig.
