[root@host51 ~]# cat /kkk
1111111
2222222
3333333
[root@host51 ~]# awk '{print}' /kkk
1111111
2222222
3333333
[root@host51 ~]# awk '{print NR}' /kkk
1
2
3
[root@host51 ~]# awk '{print NF}' /kkk
1
1
1
[root@host51 ~]#
具休还是看下教程吧blog.csdn.net/cbuy888/article/details/80561461
百度搜"linux awk详细使用方法" 我写的