bug-bash
[Top][All Lists]
Advanced

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

Re: Is it possible or RFE to expand ranges of *arrays*


From: John Kearney
Subject: Re: Is it possible or RFE to expand ranges of *arrays*
Date: Thu, 26 Apr 2012 06:30:19 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120420 Thunderbird/12.0

Am 26.04.2012 06:26, schrieb Linda Walsh:
I know I can get
a="abcdef" echo "${a[2:4]}" = cde

 how do I do:
typeset -a a=(apple berry cherry date); then get:

echo ${a[1:2]} = "berry" "cherry"  ( non-grouped args)

I tried to do it in a function and hurt myself.



echo ${a[@]:1:2}



reply via email to

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