bug-bash
[Top][All Lists]
Advanced

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

Re: Gnu Bash Manual - Getting the Array Size


From: Chet Ramey
Subject: Re: Gnu Bash Manual - Getting the Array Size
Date: Thu, 16 Dec 2021 14:29:09 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.0

On 12/16/21 1:33 PM, fatiparty--- via Bug reports for the GNU Bourne Again
SHell wrote:
> 
> Have been reading the Gnu Bash Manual "6.7 Arrays" and there is no mention of 
> ${#name[*]} to get the array size. 

"${#NAME[SUBSCRIPT]}' expands to the length of
'${NAME[SUBSCRIPT]}'.  If SUBSCRIPT is '@' or '*', the expansion is the
number of elements in the array."


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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