sed、awk学习篇
[yongsan@yz6245 ~]$ awk 'BEGIN {FS=":"}{shells[$NF]++;}END{for(i in shells)print i ": " shells[i];}' passwd
/sbin/shutdown: 1
/bin/bash: 52
/sbin/nologin: 49
/sbin/halt: 1
/nologin: 1
/bin/sync: 1
[yongsan@yz6245 ~]$ cat passwd |sed 's!/bin/bash$!/sbin/nologin!g'