使用awk以冒号分隔获取/etc/passwd文件第一列

 

[14:18:00 root@centos8 ~]#awk -F : '{print $1}' /etc/passwd
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
operator
games
ftp
nobody
dbus
systemd-coredump
systemd-resolve

 

posted @ 2021-10-27 15:31  小糊涂90  阅读(48)  评论(0编辑  收藏  举报