[Top][All Lists]

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

grep --ignore-case fails with --only-matching

From: BISHOP Michaël
Subject: grep --ignore-case fails with --only-matching
Date: Thu, 13 Nov 2003 07:09:38 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031008 Thunderbird/0.3

When searching for a case-insensitive pattern, grep is able to correctly identify the matching line when using --ignore-case.  However, when --only-matching is added, grep passes nothing and returns zero.

I didn't notice anything in the man pages stating that these two options are incompatible; did I miss something or did grep?
address@hidden mbishop $ echo "This is An _expression_." | grep --ignore-case _expression_
This is An _expression_.
address@hidden mbishop $ echo "This is An _expression_." | grep --ignore-case --only-matching _expression_
address@hidden mbishop $ echo $?

Michaël A. Bishop
906 Berkeley Place Circle
Clemson, SC  29631
Etats-Unis / USA
(864) 506-6040

"From silly devotions and sour-faced saints, spare us, O Lord."
-St. Teresa of Avila

"A truly good book teaches me better than to just read it.  I must
soon lay it down and commence living on its hint.  What I began by
reading, I must finish by acting."
-Henry David Thoreau

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

reply via email to

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