let ass_shell[$shell_type]++ 这句是什么意思 大神解释一下

qq2007621qq 2017-09-25 09:21:18
#!/bin/bash
#IFS=$'\n'
declare -A ass_shell

while read line
do
shell_type=`echo $line |awk -F":" '{print $NF}'`
let ass_shell[$shell_type]++ l
done < /etc/passwd

for i in ${!ass_shell[@]}
do
echo "$i: ${ass_shell[$i]}"
done



let ass_shell[$shell_type]++ 这句是什么意思 大神解释一下
...全文
473 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
will热爱 2017-09-25
  • 打赏
  • 举报
回复
就和c中的a[i]++一样

18,777

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 专题技术讨论区
社区管理员
  • 专题技术讨论区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧