Hi Chen,

>> 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.

Sure, but a trivial change in syntax would allow that, too:

   --bytes=/N  split the input into N roughly equal portions (byte-oriented)
   --lines=/N  split the input into N roughly equal portions (line-oriented)

then, assuming the BSD option works this way, you could document -n N
like this:

   -n N        equivalent to --bytes=/N

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

Sorry, but we try hard to avoid adding short-named options in general,
unless it's for compatibility with existing implementation.


Reply via email to