首页 > 代码库 > linux to extract contents between patterns

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