bug-bash
[Top][All Lists]
Advanced

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

Re: Bad number of digits in brace sequence expansion when used increment


From: Roman Rakus
Subject: Re: Bad number of digits in brace sequence expansion when used increment
Date: Fri, 14 Aug 2009 16:13:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2

On 07/28/2009 04:22 PM, Roman Rakus wrote:
When we use 0 prefix and increment bash will prefix all integers with bad number of zeroes. Man page says "When either x or y begins with a zero, the shell attempts to force all generated terms to contain the same number of digits, zero-padding where necessary."
The number of digits is same, but not what would anyone expect.

Repeated by:
echo {1..05..1}

Actual result:
00001 00002 00003 00004 00005

Desired result:
01 02 03 04 05

Patch included.
RR
Chet, what do you think about it?
RR




reply via email to

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