[Top][All Lists]

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

Re: split --filter=CMD: last call

From: Pádraig Brady
Subject: Re: split --filter=CMD: last call
Date: Tue, 03 May 2011 10:12:27 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100227 Thunderbird/3.0.3

On 03/05/11 09:54, Jim Meyering wrote:
> [PATCH 1/3] split: accept new output --filter=CMD option
> [PATCH 2/3] tests: test split's new --filter=CMD option
> [PATCH 3/3] doc: document split's new --filter=CMD option

I should also play devil's advocate and point
out the existing alternative to split --filter.

# Set filter as required
 filter() { cat $FILE | gzip -c > $FILE.gz; }
#create fifos
 rm -f x??
 split -n3 /dev/null
 for f in x??; do rm $f && mkfifo $f; done
 for FILE in x??; do filter& done
 split -n3 file
 rm -f x??

The above is sufficiently onerous to make split --filter
a useful option. Though I've a niggling feeling that the
above could be the basis of a contrib helper script.


reply via email to

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