如:
bb.c的内容如下
d;lakjdfa;sflkasd;flkdsjf
asdfa;slfkjasd;lfkjasdf
========================B==============
aa
at
at
a
df
as
f
asf
========================C==============
删除===B==与====C===之间的内容
root@livedoor-lg:~# sed -ne '1,/==B==/p;/==C==/,$ p' bb.c
d;lakjdfa;sflkasd;flkdsjf
asdfa;slfkjasd;lfkjasdf
========================B==============
========================C==============
|
|