运维网's Archiver
论坛
›
Shell/Powershell
› shell 取出UID大于200的用户信息
yanfangsheng123
发表于 2018-8-20 09:46:39
shell 取出UID大于200的用户信息
#!/bin/bash
#conding:utf-8
#第一种方法
while read line
do
#echo $line
uid=$(echo $line | awk -F: '{print $3}')
#echo $uid
if [ $uid -gt 200 ];then
echo $line
fi
done
页:
[1]
查看完整版本:
shell 取出UID大于200的用户信息