That does it. I read the -C option but misunderstood what it was meant for
so didn't try it.

Thanks.

On Sat, Mar 1, 2008 at 11:47 AM, Mark Carlson <[EMAIL PROTECTED]> wrote:

> On 3/1/08, Royce Souther <[EMAIL PROTECTED]> wrote:
> > Any one using the command line long enough gets good with grep. I did. I
> > have been using grep as long as I have been using Linux. And all this
> time I
> > did not even know about the cool feature to colour highlight matching
> text.
> > grep --color works great.
> >
> > What I would like to know is how can I cat a file and see all the lines
> but
> > colour highlight matching text. As far as I know grep can show only the
> > lines that match or only the lines that do not match, I have not found
> any
> > way to make it show all the lines but just highlight the matching text.
> >
> > If anyone has an idea how to do that please let me know.
>
> A bit of a hack:
> grep pattern file -C 1000000
>
> It looks funny with multiple files though.  As a side note, I recently
> added this exact feature (colorization + searching) to a customer's
> log viewer utility.  It is amazing how much more efficient my
> development has become as a result!  I think John Jardine can attest
> to that with his firewall log monitoring scripts as well.
> Colorization = good!
>
> -Mark C.
>
> _______________________________________________
> clug-talk mailing list
> [email protected]
> http://clug.ca/mailman/listinfo/clug-talk_clug.ca
> Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
> **Please remove these lines when replying
>



-- 
http://www.Radados.org
_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to