[SunHELP] grep
Sandwich Maker
adh at an.bradford.ma.us
Thu Jul 31 17:32:50 CDT 2003
"From: Bret Adams <bret at fabrikant.com>
"
"I was trying to find a way to grep a pattern in a file and then print out
"that line and the two lines preceding the match.
"I already manned the grep, egrep and fgrep man pages and nothing was listed
"that fit the bill. Maybe there is a more robust version
"of grep out there. Any pointers would be appreciated. Thanks in advance.
i can think of a dirty hack that would grep -n for the line number,
then tail +number <file> | tail -3 ...
________________________________________________________________________
Andrew Hay the genius nature
internet rambler is to see what all have seen
adh at an.bradford.ma.us and think what none thought
More information about the SunHELP
mailing list