Poor Yorick wrote:
> The syntax I'm currently using to access the last element of an array looks a 
> little evil:
> 
>> arr=( one two three )
>> echo ${arr[$(([EMAIL PROTECTED]))]}
> three
> 
> If there is not currently a friendlier syntax for this, might I suggest:
> 
> ${arr[-1]}

What's wrong with echo [EMAIL PROTECTED]: -1} ?

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    http://cnswww.cns.cwru.edu/~chet/


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to