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