[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bash-bug
Subject:    Re: Gnu Bash Manual - Getting the Array Size
From:       Chet Ramey <chet.ramey () case ! edu>
Date:       2021-12-16 19:29:09
Message-ID: 53b66d2a-6723-6537-3ee6-c1e713489cf0 () case ! edu
[Download RAW message or body]

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/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic