[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug with grep 2.3 - 2.4.2 on Intel Redhat
From: |
Erik Pennebaker |
Subject: |
Re: bug with grep 2.3 - 2.4.2 on Intel Redhat |
Date: |
Wed, 11 Jul 2001 19:27:42 -0500 |
User-agent: |
Mutt/1.2.5i |
Okay, yer right, but you don't want the \*, just *. The \* would
look for the literal '*'
sol dir) ls -l | grep 'loc\*'
sol dir) ls -l | grep 'log\*'
sol dir) ls -l | grep 'log*'
-rw-rw-r-- 1 erik erik 0 Jul 11 19:15 local
sol dir) ls -l | grep 'loc*'
-rw-rw-r-- 1 erik erik 0 Jul 11 19:15 local
sol dir)
On Wed, Jul 11, 2001 at 06:14:58PM -0500, Paul Holcomb wrote:
>
> I have found a bug with grep that manifests itself *at least* with
> version 2.3 and 2.4.2 of grep included with Redhat Intel Linux
> systems. (6.1, 6.2, 7.0, 7.0.90)
>
> If you have a regular expression ending in 'c*' it matches the letter
> 'g' instead of the letter 'c' and vice versa.
>
> How to replicate:
>
> $> touch soggy
> $> ls -l |grep 'soc\*'
>
> -> file matches
>
>
> $> touch local
> $> ls -l |grep 'log\*'
>
> -> file matches
>
>
>
> One gets the same behavior with other variations of escaping or not
> escaping the '*' wildcard character.
>
> Let me know if you require more detail. I am going to try to
> replicate this bug on a few other operating systems.
>
> --
> Paul Holcomb *pholcomb \@ cpoint net*
> Sr. Network Engineer Counterpoint Networking, Inc.
--
-----
Erik Pennebaker | http://www.wgp.net/erik | address@hidden
Sr. UNIX Systems Consultant | The Wet Gecko Project, Inc.