I'm searching a single text file. If I match on a phone number I want it to print certain lines within the block record that it find it in.
The block records have different titles and data in them but always have the phone number.
So if I find the phone number and devise a way of recognizing what record block it is then I can tell the script for this record block print these lines and
for this record block print these lines only if you find the phone number and recognize the block record heading.
The examples above helped me a little but am still not getting correct results.
I can't seem to get the script to print off any other even if it matches them except for the line with the phone number in it.