How to grep multiple patterns together
I have a file which has text with some information and has similar
structure to the following.
==== Start of Info for Employee 1 ====
--------
--------
--------
Start of Address information for employee 1
Street No
City
Zip
End of Address information
-------
-------
==== Start of Info for Employee 2 ====
--------
--------
--------
Start of Address information for employee 2
Street No
City
Zip
End of Address information
-------
-------
==== Start of Info for Employee 3 ====
--------
--------
--------
Start of Address information for employee 3
Street No
City
Zip
End of Address information
-------
-------
I am interested in getting the following information by doing a grep or
some other way:
==== Start of Info for Employee 1 ====
Start of Address information for employee 1
Street No
City
Zip
End of Address information
==== Start of Info for Employee 2 ====
Start of Address information for employee 2
Street No
City
Zip
End of Address information
==== Start of Info for Employee 3 ====
Start of Address information for employee 3
Street No
City
Zip
End of Address information
How can I do this?
No comments:
Post a Comment