bug-coreutils
[Top][All Lists]
Advanced

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

bug#21356: BUG: split shorter version of '--numeric-suffixes' give error


From: Pádraig Brady
Subject: bug#21356: BUG: split shorter version of '--numeric-suffixes' give error
Date: Thu, 27 Aug 2015 00:05:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

tag 21356 notabug
close 21356
stop

On 26/08/15 22:08, Tareque Md Khan wrote:
> Hi,
> 
> My first bug-reporting.
> 
> I discovered a /cosmetic/ bug in 'split' command. I wanted to split a file in 
> 'n' chunks, with suffix 'a' chars wide and numeric suffix starting from 'd'. 
> I tried
> 
> $ split -n10 -a4 -d5 echo.txt
> split: cannot split in more than one way
> Try 'split --help' for more information.
> 
> where as using longer option for `-d` i.e. `--numeric-suffixes` works fine.
> 
> $ split -n10 -a4 --numeric-suffixes=5 echo.txt
> 
> 
> FYI: I had asked it on unix.stackexchange as well, for reference 
> http://unix.stackexchange.com/q/225704/17265

-d can't take an _optional_ argument for backwards compat
and operational reasons.  I.E. generally short options
can't take an optional argument due to ambiguities that would introduce.

The particular ambiguity in this case is that -d5 is equivalent
to -d -5, which is equivalent to -d -l5, hence the error.

thanks,
Pádraig.






reply via email to

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