Ben NanoNote

Sign in or create your account | Project List | Help

Issue 51: BusyBox error in seq

Reported by Hardy Ordatius, Mar 24, 2010

The seq command accepts no pay negative:
root@ben# seq -2 2 [enter]
seq: invalid option --2
BusyBox v1.15.3 (2010-03-22 11:44:13 CET) multi-call binary

Comment 1 by Xiangfu Liu, Apr 1, 2010

it's BusyBox bug.
busybox-1.15.3/coreutils/seq.c line:34
add something like[1], make the "seq -2 2" work.
but "seq -w -2 1 2" not work, need a "while" to 
process
the while argument string.

this issue also need report to BusyBox :-)

[1]
	if (argv[optind][0] == '-' 
	  && ((optc = argv[optind][1]) == '.' || isdigit(optc)))
	{
		/* means negative number */
		;
	} else
		opt = getopt32(argv, "+ws:", &opt_s);
Status: Started

Created: 9 years 8 months ago by Hardy Ordatius

Updated: 9 years 8 months ago

Status: Started

Followed by: 1 person

Labels:
Type:Defect
Priority:Medium



interactive