Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15900
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: test -v for array does not work as documented |
| Date | 2020-02-19 10:22 -0500 |
| Message-ID | <mailman.1169.1582125772.2412.bug-bash@gnu.org> (permalink) |
| References | <w6ga75e23e8.fsf@kph.uni-mainz.de> <c8e8a1f7-26f3-a189-8f02-562632597849@case.edu> |
On 2/19/20 7:00 AM, Ulrich Mueller wrote: > Bash Version: 5.0 > Patch Level: 16 > Release Status: release > > Description: > The GNU Bash Reference Manual Version 5.0 says about test -v: > '-v VARNAME' > True if the shell variable VARNAME is set (has been > assigned a value). > > However, it doesn't always return true when VARNAME is an > (indexed or associative) array that has been assigned a value. If you refer to an array variable without the subscript, it's equivalent to referencing element 0. -- ``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/
Back to gnu.bash.bug | Previous | Next | Find similar
Re: test -v for array does not work as documented Chet Ramey <chet.ramey@case.edu> - 2020-02-19 10:22 -0500
csiph-web