1、cut字段提取命令
[root@localhost sh]# cat student.txt
ID Name gender Mark
1 dd M 90
2 drt M 98
3 go M 87
[root@localhost sh]# cut -f 2 student.txt
Name
dd
drt
go
[root@localhost sh]#
[root@localhost sh]# cut -f 2,4 student.txt
Name Mark
dd 90
drt 98
go 87
[root@localhost sh]#
[root@localhost sh]# cut -d ":" -f 1,3 /etc/passwd
[root@localhost sh]# cat /etc/passwd | grep /bin/bash | grep -v root | cut -d ":" -f 1
2、printf格式化输出命令