Created
July 31, 2015 10:17
-
-
Save jordiclariana/90e211eb7a00b5289e39 to your computer and use it in GitHub Desktop.
Print only a block of text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk -v BINIT="START PATTERN" -v BEND="END PATTERN" ' | |
{ | |
if ($0 ~ BINIT) { | |
F=1 | |
} | |
if ($0 ~ BEND) { | |
F=0 | |
} | |
if (F==1) { | |
print $0} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment