diff --git a/bash/array_append.bash b/bash/array_append.bash new file mode 100644 index 0000000..7368c06 --- /dev/null +++ b/bash/array_append.bash @@ -0,0 +1,13 @@ +#!/bin/bash + +# Declare a string array +arrVar=("AC" "TV" "Mobile" "Fridge" "Oven" "Blender") + +# Add new element at the end of the array +arrVar+=("Dish Washer") + +# Iterate the loop to read and print each array element +for value in "${arrVar[@]}" +do + echo $value +done