Pádraig Brady wrote: > On 14/12/09 21:04, Chen Guo wrote: >> Hi all, >> I'm about to implement everything we discussed. One thing I want to >> double check is, since we have --number-lines=x/y and --number-bytes=x/y as >> the long options, obviously we can't just use -n for the short option.
Hi Chen, Glad to hear you're still working on this. I hope the end-of-term business went well. >> So would it be acceptable to do -nb=x/y and -nl=x/y? This seems the >> most intuitive to me, but I can see where this would cause confusion with >> the -b and -l options. What do you guys think? It's good to make long option names consistent between tools, and to avoid long, common prefixes like "--number-". Have you considered --bytes and --lines, like tail has? > You can't do -nl unfortunately. > You could just add 1 new option: -n --number > This could then be used like: > > -n bytes:4 => bytes per file = size/number > -n 4 => ditto Since tail's -n means --lines, making "split -n 4" mean "bytes" would be confusing. Using a short option name like -n *may* be fine, but you have to do a survey of all other vendor versions of split to ensure that none of them provide an -n option. > -n lines:4 => ditto but don't split lines