From unknown Sun Aug 17 22:05:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#48948: grep documentation feedback Resent-From: David Apps Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Thu, 10 Jun 2021 19:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48948 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 48948@debbugs.gnu.org X-Debbugs-Original-To: bug-grep@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16233546665674 (code B ref -1); Thu, 10 Jun 2021 19:52:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Jun 2021 19:51:06 +0000 Received: from localhost ([127.0.0.1]:37750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrQhl-0001TS-NV for submit@debbugs.gnu.org; Thu, 10 Jun 2021 15:51:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:60974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrQZB-0001FQ-D4 for submit@debbugs.gnu.org; Thu, 10 Jun 2021 15:42:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrQZB-0003nn-5w for bug-grep@gnu.org; Thu, 10 Jun 2021 15:42:13 -0400 Received: from know-smtprelay-omc-10.server.virginmedia.net ([80.0.253.74]:34436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrQZ8-0001fa-0c for bug-grep@gnu.org; Thu, 10 Jun 2021 15:42:12 -0400 Received: from [192.168.8.104] ([94.196.206.183]) by cmsmtp with ESMTPA id rQZ1lWsRcsYC6rQZ2lADWk; Thu, 10 Jun 2021 20:42:04 +0100 X-Originating-IP: [94.196.206.183] X-Authenticated-User: sppa.divad@virgin.net X-Spam: 0 X-Authority: v=2.3 cv=C8DHNzH+ c=1 sm=1 tr=0 cx=a_exe a=ZXgqp+kghMbfxgY23ccBaw==:117 a=ZXgqp+kghMbfxgY23ccBaw==:17 a=IkcTkHD0fZMA:10 a=mDV3o1hIAAAA:8 a=VPmSnQ3Lhl6_epFV19sA:9 a=QEXdDO2ut3YA:10 a=1t081HBPuAcA:10 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virgin.net; s=meg.feb2017; t=1623354124; bh=6Ozj8KxG4WPTNj9kme/lajsxgmlPd8xKkew9lSbOgtY=; h=To:From:Subject:Date; b=McI61NrK69HIv2DzlKiCAkdPN4iKUCZYBq9P5vrw9lIJatb9V1AGR974jK0BPQV6W y6uTz3uSzwnmvQcUG290puouvWffJV5et/4FFF+TgojX0KCTDQWuO42syPxWOKxPWO Josg3VtY4wWhmftR7C1RxxLAQZXFrQu7f1mbqrbaRMbnKYeBI2wUKkorNHNjQuob4v rOcRBM1zazQu8iod2BPKoEiQgyav+741GscRXRuLQLqG3zVqAjhAoEn1mtYJhYoKJh hcTgeXXwWMxGuRDmnahv2ko7FAAQaSl3CzGt6oGWZTAQIt5F/VWrdbbNWdpvomQWlA F16/Nw24uPg1A== From: David Apps Message-ID: Date: Thu, 10 Jun 2021 20:42:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfKiHE3CSn16hLHwiNwcZKBbXxXZZwkaF7yclCPrPkuiglse/QbTcKbIYKW1wm0WWlYEdZ4MjF696NgqrA3olHlsz7kDsvJ1WD7ZqSO6TZvsY67tA6/x7 9D1PDX4vwwfiPX3lyuCqtCBiMPg16rwM+T9V/C8Hr0Elo4I6TBkwKo5v Received-SPF: pass client-ip=80.0.253.74; envelope-from=sppa.divad@virgin.net; helo=know-smtprelay-omc-10.server.virginmedia.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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-Mailman-Approved-At: Thu, 10 Jun 2021 15:51:04 -0400 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 (--) I hope that you are well. Thank you for your work on this great software. I have some feedback about the document at the following address: http://www.gnu.org/software/grep/manual/grep.html When quoting from this document, I have removed the non-ASCII characters. The characters that I have removed were left and right single quotation marks. 1. In the section "3.3 The Backslash Character and Special Expressions": \< Match the empty string at the beginning of word. \> Match the empty string at the end of word. Perhaps changing "of word" to "of a word" would be more consistent with the language elsewhere in the document. 2. In the section "3.6 Basic vs Extended Regular Expressions": In basic regular expressions the meta-characters ?, +, {, |, (, and ) lose their special meaning; instead use the backslashed versions \?, \+, \{, \|, \(, and \). Should } and \} appear in these lists? 3. In the section "4 Usage": $ grep -n -- 'f.*\.c$' *g*.h /dev/null The other examples do not begin with $. Perhaps remove $ for greater consistency. 4. In the section "4 Usage", perhaps the answer to question 3 would be better if the examples used -* in place of * to search for files that begin with -. Thank you. David From unknown Sun Aug 17 22:05:08 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: David Apps Subject: bug#48948: closed (Re: bug#48948: grep documentation feedback) Message-ID: References: <21c8d714-7b06-d580-94c2-cbf2410dc1b8@cs.ucla.edu> X-Gnu-PR-Message: they-closed 48948 X-Gnu-PR-Package: grep Reply-To: 48948@debbugs.gnu.org Date: Thu, 10 Jun 2021 23:11:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1623366662-23384-1" This is a multi-part message in MIME format... ------------=_1623366662-23384-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #48948: grep documentation feedback 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 48948@debbugs.gnu.org. --=20 48948: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D48948 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1623366662-23384-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 48948-done) by debbugs.gnu.org; 10 Jun 2021 23:10:48 +0000 Received: from localhost ([127.0.0.1]:37820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrTp2-00064i-1p for submit@debbugs.gnu.org; Thu, 10 Jun 2021 19:10:48 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:46394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrTox-00064T-NG for 48948-done@debbugs.gnu.org; Thu, 10 Jun 2021 19:10:46 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7DE42160108; Thu, 10 Jun 2021 16:10:37 -0700 (PDT) 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 jtnHVMcTeA2c; Thu, 10 Jun 2021 16:10:36 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 89C1016010D; Thu, 10 Jun 2021 16:10:36 -0700 (PDT) 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 1252sOi4TC5Y; Thu, 10 Jun 2021 16:10:36 -0700 (PDT) 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 61453160108; Thu, 10 Jun 2021 16:10:36 -0700 (PDT) To: David Apps References: From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: bug#48948: grep documentation feedback Message-ID: <21c8d714-7b06-d580-94c2-cbf2410dc1b8@cs.ucla.edu> Date: Thu, 10 Jun 2021 16:10:35 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------66BC57D3DBBE54C7096D72B0" Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48948-done Cc: 48948-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 (---) This is a multi-part message in MIME format. --------------66BC57D3DBBE54C7096D72B0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 6/10/21 12:42 PM, David Apps via Bug reports for GNU grep wrote: > Perhaps changing "of word" to "of a word" Good idea, thanks. > In basic regular expressions the meta-characters ?, +, {, |, (, and )=20 > lose their special meaning; instead use the backslashed versions \?, \+= ,=20 > \{, \|, \(, and \). >=20 > Should } and \} appear in these lists? No, as '}' is not a meta-character in EREs. The '}' case is different=20 and this is discussed in the next sentence. > 3. In the section "4 Usage": >=20 > $ grep -n -- 'f.*\.c$' *g*.h /dev/null >=20 > The other examples do not begin with $. Perhaps remove $ for greater=20 > consistency. That's easy enough. Also, I noticed that the surrounding explanation is=20 a bit wrong, so I fixed that too. > 4. In the section "4 Usage", perhaps the answer to question 3 would be=20 > better if the examples used -* in place of * to search for files that=20 > begin with -. The problem almost always occurs with patterns that begin with "*" and=20 unexpectedly match file names beginning with "-", so in some sense it's=20 better to leave this example as-is so that it's more-typical. I installed the attached patch to implement the above. Thanks for your=20 feedback. --------------66BC57D3DBBE54C7096D72B0 Content-Type: text/x-patch; charset=UTF-8; name="0001-doc-improve-examples-and-wording.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-doc-improve-examples-and-wording.patch" =46rom e6571dfd459f55de975ef457cf7dbd4b49ec491c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 10 Jun 2021 14:55:21 -0700 Subject: [PATCH] doc: improve examples and wording * doc/grep.texi (The Backslash Character and Special Expressions) (Usage): Improve doc (Bug#48948). --- doc/grep.texi | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/doc/grep.texi b/doc/grep.texi index e3b1555..01ac81e 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -1479,10 +1479,10 @@ Match the empty string at the edge of a word. Match the empty string provided it's not at the edge of a word. =20 @item \< -Match the empty string at the beginning of word. +Match the empty string at the beginning of a word. =20 @item \> -Match the empty string at the end of word. +Match the empty string at the end of a word. =20 @item \w Match word constituent, it is a synonym for @samp{[_[:alnum:]]}. @@ -1667,23 +1667,22 @@ The @option{-i} option causes @command{grep} to ignore case, causing it to match the line @samp{Hello, world!}, which= it would not otherwise match. =20 -Here is a more complex example session, +Here is a more complex example, showing the location and contents of any line containing @samp{f} and ending in @samp{.c}, within all files in the current directory whose names -contain @samp{g} and end in @samp{.h}. +start with non-@samp{.}, contain @samp{g}, and end in @samp{.h}. The @option{-n} option outputs line numbers, the @option{--} argument -treats any later arguments starting with @samp{-} as file names not -options, and the empty file @file{/dev/null} causes file names to be out= put +treats any later arguments as file names not options even if +@code{*g*.h} expands to a file name that starts with @samp{-}, +and the empty file @file{/dev/null} causes file names to be output even if only one file name happens to be of the form @samp{*g*.h}. =20 @example -$ @kbd{grep -n -- 'f.*\.c$' *g*.h /dev/null} -argmatch.h:1:/* definitions and prototypes for argmatch.c +grep -n -- 'f.*\.c$' *g*.h /dev/null @end example =20 @noindent -The only line that contains a match is line 1 of @file{argmatch.h}. Note that the regular expression syntax used in the pattern differs from the globbing syntax that the shell uses to match file names. =20 --=20 2.30.2 --------------66BC57D3DBBE54C7096D72B0-- ------------=_1623366662-23384-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 10 Jun 2021 19:51:06 +0000 Received: from localhost ([127.0.0.1]:37750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrQhl-0001TS-NV for submit@debbugs.gnu.org; Thu, 10 Jun 2021 15:51:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:60974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrQZB-0001FQ-D4 for submit@debbugs.gnu.org; Thu, 10 Jun 2021 15:42:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrQZB-0003nn-5w for bug-grep@gnu.org; Thu, 10 Jun 2021 15:42:13 -0400 Received: from know-smtprelay-omc-10.server.virginmedia.net ([80.0.253.74]:34436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrQZ8-0001fa-0c for bug-grep@gnu.org; Thu, 10 Jun 2021 15:42:12 -0400 Received: from [192.168.8.104] ([94.196.206.183]) by cmsmtp with ESMTPA id rQZ1lWsRcsYC6rQZ2lADWk; Thu, 10 Jun 2021 20:42:04 +0100 X-Originating-IP: [94.196.206.183] X-Authenticated-User: sppa.divad@virgin.net X-Spam: 0 X-Authority: v=2.3 cv=C8DHNzH+ c=1 sm=1 tr=0 cx=a_exe a=ZXgqp+kghMbfxgY23ccBaw==:117 a=ZXgqp+kghMbfxgY23ccBaw==:17 a=IkcTkHD0fZMA:10 a=mDV3o1hIAAAA:8 a=VPmSnQ3Lhl6_epFV19sA:9 a=QEXdDO2ut3YA:10 a=1t081HBPuAcA:10 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virgin.net; s=meg.feb2017; t=1623354124; bh=6Ozj8KxG4WPTNj9kme/lajsxgmlPd8xKkew9lSbOgtY=; h=To:From:Subject:Date; b=McI61NrK69HIv2DzlKiCAkdPN4iKUCZYBq9P5vrw9lIJatb9V1AGR974jK0BPQV6W y6uTz3uSzwnmvQcUG290puouvWffJV5et/4FFF+TgojX0KCTDQWuO42syPxWOKxPWO Josg3VtY4wWhmftR7C1RxxLAQZXFrQu7f1mbqrbaRMbnKYeBI2wUKkorNHNjQuob4v rOcRBM1zazQu8iod2BPKoEiQgyav+741GscRXRuLQLqG3zVqAjhAoEn1mtYJhYoKJh hcTgeXXwWMxGuRDmnahv2ko7FAAQaSl3CzGt6oGWZTAQIt5F/VWrdbbNWdpvomQWlA F16/Nw24uPg1A== To: bug-grep@gnu.org From: David Apps Subject: grep documentation feedback Message-ID: Date: Thu, 10 Jun 2021 20:42:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfKiHE3CSn16hLHwiNwcZKBbXxXZZwkaF7yclCPrPkuiglse/QbTcKbIYKW1wm0WWlYEdZ4MjF696NgqrA3olHlsz7kDsvJ1WD7ZqSO6TZvsY67tA6/x7 9D1PDX4vwwfiPX3lyuCqtCBiMPg16rwM+T9V/C8Hr0Elo4I6TBkwKo5v Received-SPF: pass client-ip=80.0.253.74; envelope-from=sppa.divad@virgin.net; helo=know-smtprelay-omc-10.server.virginmedia.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 10 Jun 2021 15:51:04 -0400 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 (--) I hope that you are well. Thank you for your work on this great software. I have some feedback about the document at the following address: http://www.gnu.org/software/grep/manual/grep.html When quoting from this document, I have removed the non-ASCII characters. The characters that I have removed were left and right single quotation marks. 1. In the section "3.3 The Backslash Character and Special Expressions": \< Match the empty string at the beginning of word. \> Match the empty string at the end of word. Perhaps changing "of word" to "of a word" would be more consistent with the language elsewhere in the document. 2. In the section "3.6 Basic vs Extended Regular Expressions": In basic regular expressions the meta-characters ?, +, {, |, (, and ) lose their special meaning; instead use the backslashed versions \?, \+, \{, \|, \(, and \). Should } and \} appear in these lists? 3. In the section "4 Usage": $ grep -n -- 'f.*\.c$' *g*.h /dev/null The other examples do not begin with $. Perhaps remove $ for greater consistency. 4. In the section "4 Usage", perhaps the answer to question 3 would be better if the examples used -* in place of * to search for files that begin with -. Thank you. David ------------=_1623366662-23384-1--