bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep - unexpected behavior with --color


From: Adams, Eric A (MN14)
Subject: grep - unexpected behavior with --color
Date: Thu, 2 May 2002 15:13:39 -0500

Hi,

In testing grep-2.5, I saw an unexpected interaction between options --color
and
--word-regexp.

If I use both options, the output highlights all occurances of the target
string,
both whole words and parts of words.

Testcase:

echo "yes no xxyesxx" | ./grep --color -w yes       # highlights two strings
echo "yes no xxyesxx" | ./grep --color '\<yes\>'    # highlights one string

This is either a bug or a feature :)

Thanks for all your work,
Eric Adams.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]