Bash Count Occurrences of String en tableau
let count=0
for x in ${my_array[*]}; do
if [ $x == 'abc' ]
then
count=$((count+1))
fi
done
Powerful Pollan
let count=0
for x in ${my_array[*]}; do
if [ $x == 'abc' ]
then
count=$((count+1))
fi
done