Subject: bug#59639: closed (Re: bug#59639: Is this a bug?)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 27 Nov 2022 18:13:02 +0000

Your bug report

#59639: Is this a bug?

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
59639: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59639
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#59639: Is this a bug?
From: Paul Eggert <[email-masked]>
To: Klaus Dittrich <[email-masked]>
Cc: [email-masked]
Date: Sun, 27 Nov 2022 10:11:57 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

On 2022-11-27 09:29, Klaus Dittrich wrote:
> grep  gdk* file.txt

You should quote the pattern for the shell, e.g.:

grep 'gdk*' file.txt

You can see what's going on by using the shell command 'set -x' before 
running 'grep'.

Subject: Is this a bug?
From: Klaus Dittrich <[email-masked]>
To: [email-masked]
Date: Sun, 27 Nov 2022 18:29:28 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Given file.txt with three lines:

/usr/local/lib/gdk-pixbuf-2.0
empty
/usr/local/lib/libgd2

When I do:

grep gdk file.txt
this results in : /usr/local/lib/gdk-pixbuf-2.0

Which looks ok for me.

When I do:

grep  gdk* file.txt
this results in : /usr/local/lib/gdk-pixbuf-2
                   /usr/local/lib/libgd2.0

This looks like then '*' eats the 'k'
from 'gdk*' and looks for 'gd'' instead of 'gdk*'.
Or equivalent to grep  gd* file.txt
Or equivalent to grep  gd file.txt

grep   gdk.* file.txt
this results in : /usr/local/lib/gdk-pixbuf-2.0

Which looks ok for me.
Either now the point is eaten or the point is correctly replaced by 'any 
character'

grep is grep-3.8 and linked with

Can you please verify if this is a bug or anything in my thinking is 
wrong beacuse I have overlooked something?

-- 
Regards Klaus