How can I search a text file for this pattern in Ubuntu terminal and save the output as a text file?
I'm looking for everything between the string "abc" and the string "cde" in a long list of data.
blah blah abc fkdljgn cde blah blah blah blah blah blah abc skdjfn cde blah
In the example above I would be looking for an output such as this:
It is important that I can also save the data output as a text file.
Can I use grep or agrep and if so, what is the format?