bash - Grep search strings with line breaks -


How to use grep for the output of string 'export to excel' in the input files given below? Specifically, how to control the line breaks between search strings? Is there a switch in grep that can do this or any other command?

Input files:

file a.txt:

Blah blah ... excel to export ... blah blaza .. < / P>

file b.txt:

blah blah ... export to excel ... blah blah ..

Do you want to look for files, ignore line breaks, or do you really want to see mail lines? Are you

If you have previously, you can use tr to convert Newline to an empty space:

  tr '\ n' ' '| | Grep 'excel to export' If you can do the same thing, but you just want to use the -o flag to print the actual match. You then want to adjust your regex to include any additional references. 


Comments

Popular posts from this blog

Is there an open source WebSockets (JavaScript) XMPP library? -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -

iphone - How do I make a UIPickerView in a UIActionSheet -