sed -n "/===request/,/end request/p" ./test.abc
test.abc的内容如下:
fsdfsdfsdfsdf
sdfsdfsdfs
sdfsdf
===request===
sdfsfsfsdfsdfsd
sdfsdfsfsfsdf
sdfsfsdfsdfsdf
sdfsdfsdfsdfsdf
sdfsfsd
===end request ===
===request===
sdfsfsfsfsdfsfsdf
sdfsdfsdfsdfs
sdfsfsdfsdfsdf
sdfsdfsdfsdfsd
sdfsfsdfsdfsdf
===end request===
~
~
取出的结果为:
===request===
sdfsfsfsdfsdfsd
sdfsdfsfsfsdf
sdfsfsdfsdfsdf
sdfsdfsdfsdfsdf
sdfsfsd
===end request ===
===request===
sdfsfsfsfsdfsfsdf
sdfsdfsdfsdfs
sdfsfsdfsdfsdf
sdfsdfsdfsdfsd
sdfsfsdfsdfsdf
===end request===
阅读(1114) | 评论(0) | 转发(0) |