格式:cut [参数] 文本

参数:-d [分隔符]  指定分割符,默认为TAB

   -f       指定显示的列数

   -c       单位改为字符  

示例:查看系统中所有的用户名

[root@localhost network-scripts]# cut -d : -f 1 /etc/passwd
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
operator
games
ftp
nobody
dbus
polkitd
unbound
colord
usbmuxd
avahi
avahi-autoipd
libstoragemgmt
saslauth
qemu
rpc
rpcuser
nfsnobody
rtkit
radvd
ntp
chrony
abrt
pulse
gdm
gnome-initial-setup
postfix
sshd
tcpdump
dagege

[root@localhost network-scripts]#

 

相关文章:

  • 2021-07-25
  • 2021-05-04
  • 2022-12-23
  • 2021-04-24
  • 2021-12-13
  • 2021-05-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-21
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2021-05-25
相关资源
相似解决方案