Sunday, November 27, 2022

Array example in bash shell script

 #!/bin/bash

# Create an indexed array

IndexedArray=(egg burger milk)

#Iterate over the array to get all the values

for i in "${IndexedArray[@]}";do echo "$i";done


Source:https://www.hostinger.in/tutorials/bash-script-example

No comments:

Post a Comment