bug-bash
[Top][All Lists]
Advanced

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

Re: last element of an array


From: Poor Yorick
Subject: Re: last element of an array
Date: Thu, 24 May 2007 15:04:03 +0000

>  >
>  > If there is not currently a friendlier syntax for this, might I suggest:
>  >
>  > ${arr[-1]}
>  
>  What's wrong with echo ${arr[@]: -1} ?
>  

I assume this syntax is new since 2.05b.01(1), which is what I currently have 
access to.  I did check the latest "what's new" before posting, but it must 
have been in a previous one. Thanks.

-- 
Poor Yorick




reply via email to

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