常用Linux命令:sed
1.
取出文本中指定行[m, n]之间的内容:
sed -n 'm, np' filename
Sample 1:
已知:
[jiang@eb50 ~]$ cat info.txt
this is line1
this is line2
this is line3
this is line4
this is line5
this is line6
this is line7
this is line8
想要取出[5, 7]之间的内容,可以>>>
[jiang@eb50 ~]$ sed -n '5, 7p' info.txt
this is line5
this is line6
this is line7
Over。
后续慢慢添加对sed的使用。