The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #14 (permalink)  
Old 01-28-2007
radoulov's Avatar
radoulov radoulov is offline
addict
 

Join Date: Jan 2007
Location: Milan, Italy/Varna, Bulgaria
Posts: 1,516
And, of course, (given your input format) with GNU grep:

Code:
grep -B2 -A5 -f file2 file1

Last edited by radoulov; 01-28-2007 at 07:07 AM.
Reply With Quote