bash: expanded working with arrays (#534)

This commit is contained in:
Petr Heinz 2020-06-23 16:23:07 +02:00 committed by GitHub
parent 6b7e8ed460
commit 3a918a1619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -461,6 +461,7 @@ echo ${#Fruits[@]} # Number of elements
echo ${#Fruits} # String length of the 1st element
echo ${#Fruits[3]} # String length of the Nth element
echo ${Fruits[@]:3:2} # Range (from position 3, length 2)
echo ${!Fruits[@]} # Keys of all elements, space-separated
```
### Operations