delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/20/13:06:46

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <27245865.post@talk.nabble.com>
References: <27245865 DOT post AT talk DOT nabble DOT com>
From: Edward McGuire <MetaEd AT MetaEd DOT COM>
Date: Wed, 20 Jan 2010 12:06:16 -0600
Message-ID: <2273f6551001201006w6c9041a4i4cb06bf39b9abc5c@mail.gmail.com>
Subject: Re: highlight keywords
To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Wed, Jan 20, 2010 at 11:56, indrek <hosby AT hot DOT ee> wrote:
> I'm using make/gcc for compiling applications. It generates a lot of output.
> I need to highlight some keywords (show red text), in example "error".
> Is it possible with Cygwin. My OS is Windows XP.

Use grep(1). It has the color option you are looking for. Here is an
example having a simple regexp that matches (prints) all lines but
highlights "error" as it does so.

    grep -E --color 'error|$'

Best wishes,

Edward
-- 
What part of "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn"
don't you understand?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019