1.排除命令(取反)
1 This is the header line
2 This is the first line
3 This is the second line
4 This is the last line
使用排除的方式打印出不包含header的所有行的内容
# 不使用!取反打印出的内容
[root@tf1 sed-gaoji]# sed -n '/header/p' data3.txt
This is the header line
# 使用!排除包含header行之后打印出内容
[root@tf1 sed-gaoji]# sed -n '/header/!p' data3.txt
This is the first line
This is the second line
This is the last line