Add a way to get the last element

This commit is contained in:
Nikolay Kozhemyak 2020-06-12 21:10:54 +06:00
parent 6b2cc8de1e
commit cd02419737
1 changed files with 1 additions and 0 deletions

View File

@ -447,6 +447,7 @@ Fruits[2]="Orange"
```bash
echo ${Fruits[0]} # Element #0
echo ${Fruits[-1]} # Last element
echo ${Fruits[@]} # All elements, space-separated
echo ${#Fruits[@]} # Number of elements
echo ${#Fruits} # String length of the 1st element