2018-11-12 shell脚本

写个shell脚本,查看系统中是否有自定义的用户(普通用户),若是有,一共有几个 

#!/bin/bash
#2018-11-12
c=0
for a in `awk -F ":" '{print $3}' /etc/passwd`
   do
     if [ $a  -ge 1000 ]
     then
      let c++
    fi
done
echo $c


 

猜你喜欢

转载自blog.csdn.net/a1779078902/article/details/83994890