From unknown Tue Jun 17 03:39:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59639: Is this a bug? Resent-From: Klaus Dittrich Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sun, 27 Nov 2022 17:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59639 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 59639@debbugs.gnu.org X-Debbugs-Original-To: bug-grep@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166957157027741 (code B ref -1); Sun, 27 Nov 2022 17:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Nov 2022 17:52:50 +0000 Received: from localhost ([127.0.0.1]:43347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozLpg-0007DM-DM for submit@debbugs.gnu.org; Sun, 27 Nov 2022 12:52:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:41694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozLTE-0006zE-2S for submit@debbugs.gnu.org; Sun, 27 Nov 2022 12:29:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozLTD-0002vv-Qx for bug-grep@gnu.org; Sun, 27 Nov 2022 12:29:35 -0500 Received: from mailout05.t-online.de ([194.25.134.82]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozLTC-0001ox-1B for bug-grep@gnu.org; Sun, 27 Nov 2022 12:29:35 -0500 Received: from fwd86.dcpf.telekom.de (fwd86.aul.t-online.de [10.223.144.112]) by mailout05.t-online.de (Postfix) with SMTP id 76FC710D74 for ; Sun, 27 Nov 2022 18:29:29 +0100 (CET) Received: from df1tl.local.here ([79.200.115.214]) by fwd86.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1ozLT7-4Ru6Qj0; Sun, 27 Nov 2022 18:29:29 +0100 Received: from [192.168.168.33] (df1tl.local.here [192.168.168.33]) by df1tl.local.here (Postfix) with ESMTP id B986454001A for ; Sun, 27 Nov 2022 18:29:28 +0100 (CET) Message-ID: <2ac3ee98-802d-9add-065c-a0a521b7f54d@t-online.de> Date: Sun, 27 Nov 2022 18:29:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Content-Language: de-DE From: Klaus Dittrich Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TOI-EXPURGATEID: 150726::1669570169-D9A4E9D3-97DD7CCF/0/0 CLEAN NORMAL X-TOI-MSGID: 08ad93bf-9caf-4d31-8083-6dd78dd80265 Received-SPF: none client-ip=194.25.134.82; envelope-from=kladit@t-online.de; helo=mailout05.t-online.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Mailman-Approved-At: Sun, 27 Nov 2022 12:52:47 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From unknown Tue Jun 17 03:39:04 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Klaus Dittrich Subject: bug#59639: closed (Re: bug#59639: Is this a bug?) Message-ID: References: <1f4ee14e-a6cf-4a6b-dcbe-5da0a20a5691@cs.ucla.edu> <2ac3ee98-802d-9add-065c-a0a521b7f54d@t-online.de> X-Gnu-PR-Message: they-closed 59639 X-Gnu-PR-Package: grep Reply-To: 59639@debbugs.gnu.org Date: Sun, 27 Nov 2022 18:13:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1669572782-28565-1" This is a multi-part message in MIME format... ------------=_1669572782-28565-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 59639@debbugs.gnu.org. --=20 59639: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D59639 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1669572782-28565-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 59639-done) by debbugs.gnu.org; 27 Nov 2022 18:12:06 +0000 Received: from localhost ([127.0.0.1]:43443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozM8M-0007QT-4X for submit@debbugs.gnu.org; Sun, 27 Nov 2022 13:12:06 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozM8K-0007Q2-W5 for 59639-done@debbugs.gnu.org; Sun, 27 Nov 2022 13:12:05 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BC291160041; Sun, 27 Nov 2022 10:11:58 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 71WrSgzPiHtt; Sun, 27 Nov 2022 10:11:58 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1CEBE160048; Sun, 27 Nov 2022 10:11:58 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.9.2 zimbra.cs.ucla.edu 1CEBE160048 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=78364E5A-2AF3-11ED-87FA-8298ECA2D365; t=1669572718; bh=M1puGhe0lL2oBlcjpdVsS5zpnFKKvL2OeHqKJJdRxfw=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type: Content-Transfer-Encoding; b=h6QG17kCX5H8UcqQ+kILwWrf+s966YtMicu5IH9G+qydQa9mR9gwfP6oL68BRaQJk E+1SGeOPdcizPgFGFLFfyt1WqgL3+rxLcJHxxBz82pB+ZmSYlM2BEfDHSVllR5Zxin HPbKdxeu/w+30C873cVm5jxFux+YQPP2SaZAjRvQ= X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id n0CFTsPo36oz; Sun, 27 Nov 2022 10:11:58 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E5C0E160041; Sun, 27 Nov 2022 10:11:57 -0800 (PST) Message-ID: <1f4ee14e-a6cf-4a6b-dcbe-5da0a20a5691@cs.ucla.edu> Date: Sun, 27 Nov 2022 10:11:57 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: bug#59639: Is this a bug? Content-Language: en-US To: Klaus Dittrich References: <2ac3ee98-802d-9add-065c-a0a521b7f54d@t-online.de> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <2ac3ee98-802d-9add-065c-a0a521b7f54d@t-online.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59639-done Cc: 59639-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 2022-11-27 09:29, Klaus Dittrich wrote: > grep=C2=A0 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=20 running 'grep'. ------------=_1669572782-28565-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Nov 2022 17:52:50 +0000 Received: from localhost ([127.0.0.1]:43347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozLpg-0007DM-DM for submit@debbugs.gnu.org; Sun, 27 Nov 2022 12:52:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:41694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozLTE-0006zE-2S for submit@debbugs.gnu.org; Sun, 27 Nov 2022 12:29:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozLTD-0002vv-Qx for bug-grep@gnu.org; Sun, 27 Nov 2022 12:29:35 -0500 Received: from mailout05.t-online.de ([194.25.134.82]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozLTC-0001ox-1B for bug-grep@gnu.org; Sun, 27 Nov 2022 12:29:35 -0500 Received: from fwd86.dcpf.telekom.de (fwd86.aul.t-online.de [10.223.144.112]) by mailout05.t-online.de (Postfix) with SMTP id 76FC710D74 for ; Sun, 27 Nov 2022 18:29:29 +0100 (CET) Received: from df1tl.local.here ([79.200.115.214]) by fwd86.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1ozLT7-4Ru6Qj0; Sun, 27 Nov 2022 18:29:29 +0100 Received: from [192.168.168.33] (df1tl.local.here [192.168.168.33]) by df1tl.local.here (Postfix) with ESMTP id B986454001A for ; Sun, 27 Nov 2022 18:29:28 +0100 (CET) Message-ID: <2ac3ee98-802d-9add-065c-a0a521b7f54d@t-online.de> Date: Sun, 27 Nov 2022 18:29:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Content-Language: de-DE To: bug-grep@gnu.org From: Klaus Dittrich Subject: Is this a bug? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TOI-EXPURGATEID: 150726::1669570169-D9A4E9D3-97DD7CCF/0/0 CLEAN NORMAL X-TOI-MSGID: 08ad93bf-9caf-4d31-8083-6dd78dd80265 Received-SPF: none client-ip=194.25.134.82; envelope-from=kladit@t-online.de; helo=mailout05.t-online.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 27 Nov 2022 12:52:47 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 ------------=_1669572782-28565-1-- From unknown Tue Jun 17 03:39:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59639: Is this a bug? Resent-From: Gary Johnson Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sun, 27 Nov 2022 18:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59639 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 59639@debbugs.gnu.org X-Debbugs-Original-To: bug-grep@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166957550630548 (code B ref -1); Sun, 27 Nov 2022 18:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Nov 2022 18:58:26 +0000 Received: from localhost ([127.0.0.1]:43662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozMrB-0007we-NX for submit@debbugs.gnu.org; Sun, 27 Nov 2022 13:58:26 -0500 Received: from lists.gnu.org ([209.51.188.17]:47340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozMrA-0007wY-EL for submit@debbugs.gnu.org; Sun, 27 Nov 2022 13:58:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozMrA-0002pp-7t for bug-grep@gnu.org; Sun, 27 Nov 2022 13:58:24 -0500 Received: from mail.spocom.com ([206.63.224.240]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozMr8-0005vA-F2 for bug-grep@gnu.org; Sun, 27 Nov 2022 13:58:24 -0500 Received: from localhost (174-31-55-33.spkn.qwest.net [174.31.55.33]) by mail.spocom.com with SMTP; Sun, 27 Nov 2022 10:51:49 -0800 Date: Sun, 27 Nov 2022 10:54:07 -0800 From: Gary Johnson Message-ID: <20221127185407.GA16317@phoenix> Mail-Followup-To: bug-grep@gnu.org References: <2ac3ee98-802d-9add-065c-a0a521b7f54d@t-online.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2ac3ee98-802d-9add-065c-a0a521b7f54d@t-online.de> X-Operating-System: Linux 2.6.32-74-generic GNU/Linux User-Agent: Mutt/1.5.20 (2009-06-14) Received-SPF: pass client-ip=206.63.224.240; envelope-from=garyjohn@spocom.com; helo=mail.spocom.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 2022-11-27, Klaus Dittrich wrote: > 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' > Can you please verify if this is a bug or anything in my thinking is > wrong beacuse I have overlooked something? I think you are confusing regular expressions with globs. The pattern used by most if not all shells for file-name expansion is a glob. In a glob, an asterisk is replaced by zero or more characters. In a glob, gdk* means gdk followed by zero or more characters. The pattern argument to grep is a regular expression. In a regular expression, an asterisk means zero or more of the preceding element, which in the simplest case is a single character. In a regular expression, gdk* means gd followed by zero or more of the letter k. HTH, Gary