1.sed -n '2'p file
只打印第二行,不打印其它的行
2.sed -n '1,4'p file
从第一行到第四行的记录
3.sed -n '/los/'p file
打印匹配los的行
5 sed -n '4,/los/'p file
打印从第四行到匹配los的之间的所有行
6. sed '1,2'd file

把第一行和第二行全部删除

Sed行定位的使用

相关文章:

  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2022-01-29
猜你喜欢
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2021-10-30
  • 2021-10-29
  • 2022-12-23
相关资源
相似解决方案