Adds simpler push for bash array (#894)

Here is a less verbose push than the one listed
This commit is contained in:
Paul Cathey 2018-11-16 11:58:15 -08:00 committed by chad d
parent 117e9905d8
commit 6164a16f57
1 changed files with 1 additions and 0 deletions

View File

@ -425,6 +425,7 @@ echo ${Fruits[@]:3:2} # Range (from position 3, length 2)
```bash
Fruits=("${Fruits[@]}" "Watermelon") # Push
Fruits+=('Watermelon') # Also Push
Fruits=( ${Fruits[@]/Ap*/} ) # Remove by regex match
unset Fruits[2] # Remove one item
Fruits=("${Fruits[@]}") # Duplicate