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 ? -gordon
