On 7/8/10 10:27 PM, Peng Yu wrote: > Hi, > > array=(a b c) > echo ${arr...@]:1:2} > > > I'm looking for the document for the above usage. I checked the Arrays > section of man bash, but I don't see a description of such usage. I > also searched man bash with [0-9]+:[0-9]+. But I still don't find a > description. Could anybody let me know where this is documented?
In substring expansion: If parameter is @, the result is length posi- tional parameters beginning at offset. If parameter is an indexed array name subscripted by @ or *, the result is the length members of the array beginning with ${parameter[offset]}. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/