Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Bash script Array + For loop

month=("JAN" "FEB" "MAR" "APR" "MAY" "JUN")

for i in ${month[@]}
do
        echo -e "Month name is: c"
        echo "$i"
done
        echo
        echo -e "Total Month are: c"
        echo "${#month[@]}"
        echo
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Bash #script #Array #For #loop
ADD COMMENT
Topic
Name
1+9 =