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

Previous Next

Package: coreutils;

Reported by: Tareque Md Khan <mohdtarequekhan <at> gmail.com>

Date: Wed, 26 Aug 2015 22:22:01 UTC

Severity: normal

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 21356 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Tareque Md Khan <mohdtarequekhan <at> gmail.com>, 21356 <at> debbugs.gnu.org
Subject: Re: bug#21356: BUG: split shorter version of '--numeric-suffixes'
 give error
Date: Thu, 27 Aug 2015 00:05:49 +0100
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.





This bug report was last modified 6 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.