[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] split: --chunks option
From: |
Chen Guo |
Subject: |
Re: [PATCH] split: --chunks option |
Date: |
Tue, 15 Dec 2009 01:03:22 -0800 (PST) |
Hi Jim,
> One possibility is to stick with the existing long option names,
> but let an argument of the form "K/N" evoke the new semantics:
>
> --bytes=K/N extract the K'th of N portions (byte-oriented)
> --lines=K/N extract the K'th of N portions (line-oriented)
>
While this little split project started from the extract Kth of N syntax,
BSD's -n option is split a file into N equal pieces. Hence we actually
have four syntaxes to cover: division by bytes and division by lines,
into N equal chunks in output files, and extract the Kth of N equal
chunksto stdout.
Given that, I can't help but feel there should be more similarity
between the two equal chunk options, than an equal chunk option
and a size-in-bytes or size-in-lines option.
I feel the most elegant way, like i stated earlier, is -nl and -nb. As
Padraig said, it's impossible as one option, but perhaps we can do
something like ls's -lh option, where -h extends -l?
- Re: [PATCH] split: --chunks option,
Chen Guo <=