Solaris would be preferable, but I'll take linux or something I can compile. Does such a beast exist?
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
You can get GNU grep and it's dependencies for Solaris from sunfreeware.com either as a binary download in pkg format which installs in /usr/local/bin or as a source package. |
|||
|
|
|
As far as GNU grep go, this will show you the number of lines before the match:
Equivilent for after:
You can download GNU Grep here: http://www.gnu.org/s/grep/ |
|||||
|
|
A small awk script will also work:
replace |
|||
|
|
