diff --git a/bash.md b/bash.md index a4c54dc82..15e0d98e0 100644 --- a/bash.md +++ b/bash.md @@ -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