GNU bug report logs - #22656
How to grep two patterns in a line with correct coloring?

Previous Next

Package: grep;

Reported by: Peng Yu <pengyu.ut <at> gmail.com>

Date: Sun, 14 Feb 2016 00:11:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gary Johnson <garyjohn <at> spocom.com>
To: 22656 <at> debbugs.gnu.org
Subject: bug#22656: How to grep two patterns in a line with correct coloring?
Date: Sat, 13 Feb 2016 18:28:37 -0800
On 2016-02-13, Peng Yu wrote:
> Hi,
> 
> I know that I can use this to grep two patterns. But it can not
> highlight both patterns.
> 
> grep word1 FILE | grep word2

This seems to work:

    grep --color=always word1 FILE | grep word2

Regards,
Gary





This bug report was last modified 9 years and 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.