Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: extended braces syntax, {1..32..-03}



On 6 December 2010 21:57, Richard Hartmann <richih.mailinglist@xxxxxxxxx> wrote:
> On Sun, Dec 5, 2010 at 16:41, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
>> % echo {1..-04}
>> 001 000 -01 -02 -03 -04
>
> Why is there extra padding for 001 and 000?
>
>> % echo {1..-4..01}
>> 01 00 -1 -2 -3 -4
>> % echo {1..-4..-02}
>> -03 -01 001
>>
>> Originally i had the same number of zeroes regardless of the minus
sign, but bash does it this way, so I figured I'd be consistent with
that.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author