📜  bash 计数数组中字符串的出现次数 - Shell-Bash 代码示例
📅  最后修改于: 2022-03-11 14:51:10.746000             🧑  作者: Mango
代码示例2
let count=0
for x in ${my_array[*]}; do
if [ $x == 'abc' ]
then
count=$((count+1))
fi
done