On Wed, Jun 29, 2011 at 01:42:06PM +0200, Maarten Billemont wrote:
> If you expand ${arr[@]:1:2}, you get the following:
> values: [ a | b | c ]
> indexes: 0 1 2 3
> expand: [ 1 2 ] => b c
> ^ start from 1
> ^ length 2
>
> I propose we let a negative length iterate backward, so with ${arr[@]:1:-2},
> you get the following:
> values: [ a | b | c ]
> indexes: 0 1 2 3
> expand: 1 ] [ 2 => a c
> ^ start from 1
> ^ length 2But if you're starting with element 1, why wouldn't it be "b a"?
