regex command line linux - select all lines between two strings -



regex command line linux - select all lines between two strings -

i have text file contents this:

here super text: text should selected cool match , how ends blah blah...

i trying 2 lines (but more or less lines) between:

some super text:

and

and how

i using grep on ubuntu machine , lot of patterns i've found seem specific different kinds of regex engines.

so should end this:

grep "my regex goes here" myfilenamehere

not sure if egrep needed, utilize easy.

i don't see how done in grep. using awk:

awk '/^and how/ {p=0}; p; /some super text:$/ {p=1}' file

regex linux grep

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -