The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 04-27-2007
srinivasan_85 srinivasan_85 is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 28
See if this helps??

Hi,
I've seen something similar to this while using "gnu grep". If you simply grep for something, only those lines containing the search-pattern will be displayed. But if u issue "gnu grep -1 'search-pattern' file", you will get the lines immediately before and after the line containing the search-pattern.

In your case, it gives the line just before the line containing search-pattern, i guess.

There is a chance that your "egrep" may be aliased to "gnu egrep", or at least you are using the version of egrep inside the gnu folder.

It would be kind of you, if you would explain the functionality of "-B" option. I wasnt able to ascertain..

Thanks,
Srini

Last edited by srinivasan_85; 04-27-2007 at 08:54 AM.. Reason: Typographical mistakes