linux to extract contents between patterns

参考:http://stackoverflow.com/questions/19177721/extract-lines-between-two-patterns-from-a-lfile

awk '/pattern1/ {p=1}; p; /pattern2/ {p=0}' file

  

posted @ 2014-08-20 13:23  Daniel King  阅读(157)  评论(0编辑  收藏  举报