in reply to Re^2: grep return the entire file not the line which matches
in thread grep return the entire file not the line which matches
The example I gave will match the all of the lines that contain the search phrase. Perhaps you should try my example with your data and see what happens.