liujiaxin2018

1、linux系统中如何统计文件的行数

[root@centos79 test]# cat b.txt
a g e
d c j
i x a
[root@centos79 test]# wc -l b.txt
3 b.txt

 

2、

[root@centos79 test]# cat b.txt
a g e
d c j
i x a
[root@centos79 test]# sed -n \'$=\' b.txt
3

 

3、

[root@centos79 test]# cat a.txt
a g r e
i x k like
a f g liker
[root@centos79 test]# awk \'END{print NR}\' a.txt
3

 

分类:

技术点:

相关文章:

  • 2021-12-16
  • 2021-11-11
  • 2022-12-23
  • 2021-12-19
  • 2021-06-09
  • 2022-12-23
猜你喜欢
  • 2021-11-23
  • 2022-12-23
  • 2021-07-29
  • 2022-01-21
  • 2021-11-23
  • 2022-12-23
  • 2021-07-20
相关资源
相似解决方案