Bug#651757: enum: 'enum .. 0x 4 .. 40': ERROR: Unidentified token: 0x

2011-12-17 Thread Jan Hauke Rahm
On Sun, Dec 11, 2011 at 06:02:39PM -0500, A. Costa wrote:
 If 'COUNTx' means do something COUNT times, '0x' 
 should do (and print) nothing, but:
 
 % enum .. 0x 4 .. 40
 ERROR: Unidentified token:
 0x
 
 Comparitive note; 'jot' is more confusing.  Its first argument is 'reps',
 but '0' reps means infinity:

Yeah, jot is basically of no help anywhere. :-P But you're right. enum
should be able to deal with a COUNT of 0 and output nothing. It is a bit
tricky because of the implementation, though. We'll have a look at it.

Thanks for trying to make enum better!

Hauke

-- 
 .''`.   Jan Hauke Rahm j...@debian.org   www.jhr-online.de
: :'  :  Debian Developer www.debian.org
`. `'`   Member of the Linux Foundationwww.linux.com
  `- Fellow of the Free Software Foundation Europe  www.fsfe.org


signature.asc
Description: Digital signature


Bug#651757: enum: 'enum .. 0x 4 .. 40': ERROR: Unidentified token: 0x

2011-12-11 Thread A. Costa
Package: enum
Version: 1.0.3-1
Severity: minor

Dear Maintainer,

If 'COUNTx' means do something COUNT times, '0x' 
should do (and print) nothing, but:

% enum .. 0x 4 .. 40
ERROR: Unidentified token:
0x

Comparitive note; 'jot' is more confusing.  Its first argument is 'reps',
but '0' reps means infinity:

% jot 0 1 2
jot: Infinite sequences cannot be bounded
usage:  jot [ options ] [ reps [ begin [ end [ s ] ] ] ]

# unbounded
% jot 0 1 | head | tail -n 1
10

# show how far it gets in 2 seconds.  (Almost two million.)
% { timeout 2s jot 0 1 ; } | tail -n 1
1748104

'tail -n' seems more intuitive:

% enum 10 | tail -n 0 ; echo finis 
finis

I'd suggest letting '0x' mean print nothing.

Hope this helps...


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.1.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash

Versions of packages enum depends on:
ii  libc6  2.13-21

enum recommends no packages.

enum suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org