如何在Linux中只选择非系统用户?如何依赖于他们的ID?I need smth like this. Don't pay attention to the date. It's unnecessary
那我现在,该如何继续下去?
# !/bin/bash
now=$(date --date "$(date +"%Y-%m-%d") -2 month" +%F)
for i in $(cat /etc/passwd | awk -F: '{print $1 ":" $3}'); do
id=$(echo $i | awk -F: '{print $2}')
name=$(echo $i | awk -F: '{print $1}')
1条答案
按热度按时间cyvaqqii1#
非系统用户的ID大于1000且!= 65534