From unknown Sun Jun 15 08:26:44 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#38792 <38792@debbugs.gnu.org> To: bug#38792 <38792@debbugs.gnu.org> Subject: Status: man grep Reply-To: bug#38792 <38792@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:26:44 +0000 retitle 38792 man grep reassign 38792 grep submitter 38792 Martin Simons severity 38792 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 29 10:18:13 2019 Received: (at submit) by debbugs.gnu.org; 29 Dec 2019 15:18:13 +0000 Received: from localhost ([127.0.0.1]:60076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilaKa-0006Z7-Ij for submit@debbugs.gnu.org; Sun, 29 Dec 2019 10:18:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:56118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilZV4-0005AE-S8 for submit@debbugs.gnu.org; Sun, 29 Dec 2019 09:24:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39987) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilZV3-0005IM-Iy for bug-grep@gnu.org; Sun, 29 Dec 2019 09:24:58 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.8 required=5.0 tests=BAYES_50,DEAR_FRIEND, KHOP_HELO_FCRDNS autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilZV1-00027p-QI for bug-grep@gnu.org; Sun, 29 Dec 2019 09:24:57 -0500 Received: from house4holiday.nl ([85.17.171.74]:33309 helo=mail.webhuis.nl) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ilZV1-0001jf-J9 for bug-grep@gnu.org; Sun, 29 Dec 2019 09:24:55 -0500 Received: by mail.webhuis.nl (Postfix, from userid 33) id 9CC754839D6; Sun, 29 Dec 2019 14:24:47 +0000 (GMT) To: bug-grep@gnu.org Subject: man grep X-PHP-Originating-Script: 0:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 29 Dec 2019 15:24:47 +0100 From: Martin Simons Organization: Webhuis Message-ID: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> X-Sender: martin@webhuis.nl User-Agent: Roundcube Webmail/1.1.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 85.17.171.74 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 29 Dec 2019 10:18:10 -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: -0.7 (/) Dear Friend, At the moment I am working part time as a Unix / Linux teacher and also as an AIX system administrator. Privately I am using Debian / Ubuntu and I use it while in class, giving presentations and on the fly examples of statements and so on. In class I tell the students how grep should be used in a directory called test. Please find the contents of the directory and some files below. My example of use is as follows: martin@laptop:~/test$ grep 'Jantje*' school.txt Which delivers the desired output: Jantje Ik las dat Jantje Jantje voortaan op tijd op school komt, Hoogachtend, Jantjes vader, Piet Bel. So far for the class. In reality, however, in most occasions the statement will be issued like this (objections are being laughed away): martin@laptop:~/test$ grep Jantje* school.txt Delivering this undesired output: Jantjes:Jantje zag eens pruimen hangen Jantjes:en Jantje wilde pruimen plukken voor zijn moeder Jantjes:toen zei Jantjes moeder Jantjes:pas toch op Jantje! school.txt:Jantje school.txt:Ik las dat Jantje school.txt:Jantje voortaan op tijd op school komt, school.txt:Hoogachtend, Jantjes vader, Piet Bel. In trying to give more weight to the argument I pointed the students to the man page of grep, but it struck me that there is not a single reference to the need of using quotes in the search pattern. This does not help. I checked the AIX man page for grep and they at least give some, not all, examples of using quotes around the search pattern. The example given above makes me assume grave errors occur in production environments, just because users are not lead to use search patterns right. It may no be the task of the grep project to provide a man page, but even then I feel there is an opportunity for improvement here by providing a basic man page with a couple of good examples. I would be more than glad to contribute. Files and Contents of test. Diectory test: -rw-r--r-- 1 martin martin 208 May 20 2019 Jantje -rw-r--r-- 1 martin martin 124 Apr 30 2019 Jantjes -rw-r--r-- 1 martin martin 242 Jun 27 2019 school.txt The contents of Jantjes and school.txt are: file Jantjes: Jantje zag eens pruimen hangen en Jantje wilde pruimen plukken voor zijn moeder toen zei Jantjes moeder pas toch op Jantje! file school.txt: Geachte Heer de Vries, Jantje Ik las dat Jantje weer eens te laat op school kwam. Ik kan u verzekeren dat wij er alles aan zullen doen om er voor te zorgen dat Jantje voortaan op tijd op school komt, Hoogachtend, Jantjes vader, Piet Bel. Met vriendelijke groet, Martin. LinkedIn: https://www.linkedin.com/in/martinsimons1/ GitHub: https://github.com/Webhuis/CFEngine-Roadshow/tree/master/ Twitter: https://twitter.com/webhuis @Webhuis #TheCFEngineRoadshow From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 29 13:46:23 2019 Received: (at 38792) by debbugs.gnu.org; 29 Dec 2019 18:46:23 +0000 Received: from localhost ([127.0.0.1]:60221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilda2-0007Ja-FW for submit@debbugs.gnu.org; Sun, 29 Dec 2019 13:46:22 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ildZz-0007JK-Oi for 38792@debbugs.gnu.org; Sun, 29 Dec 2019 13:46:21 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 13A23160158; Sun, 29 Dec 2019 10:46:13 -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 M2ntY09yoiPA; Sun, 29 Dec 2019 10:46:11 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 78235160263; Sun, 29 Dec 2019 10:46:11 -0800 (PST) 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 9tLhUtm3UCHZ; Sun, 29 Dec 2019 10:46:11 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4A9E3160158; Sun, 29 Dec 2019 10:46:11 -0800 (PST) Subject: Re: bug#38792: man grep To: Martin Simons References: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <54460c40-9419-89f8-ab6b-7f45d75adf57@cs.ucla.edu> Date: Sun, 29 Dec 2019 10:46:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> Content-Type: multipart/mixed; boundary="------------2631300642B7C8DA4A7171FD" Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38792 Cc: 38792@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. --------------2631300642B7C8DA4A7171FD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 12/29/19 6:24 AM, Martin Simons wrote: > It may not be the task of the grep project to provide a man page, but even then I > feel there is an opportunity for improvement here Right on both counts. I installed the attached patches to improve things a bit in the next version of grep. Thanks for reporting the problem. The GNU guidelines deprecate man pages, so extended examples should go into doc/grep.texi where students can view them at . So if you'd like to improve the examples further, please suggest them as patches to doc/grep.texi in "git format-patch" style. If they're extensive we'll also need to get the copyright formalities done which I can fill you in about if you're interested in pursuing this. --------------2631300642B7C8DA4A7171FD Content-Type: text/x-patch; charset=UTF-8; name="0001-doc-document-quoting-better.patch" Content-Disposition: attachment; filename="0001-doc-document-quoting-better.patch" Content-Transfer-Encoding: quoted-printable >From 8b7da49786e613c6ae9a2b299b1ce2187b32ed26 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 29 Dec 2019 10:35:40 -0800 Subject: [PATCH 1/2] doc: document quoting better MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Problem reported by Martin Simons (Bug#38792). * doc/grep.texi: Fix quoting used in examples. Say that patterns should be quoted, use quoting more consistently in examples, and give an example illustrating the difference between patterns and globbing. Don=E2=80=99t assume zgrep expertise in example. * doc/grep.in.1: Likewise. Also, reorder sections to match GNU/Linux man-pages style. --- doc/grep.in.1 | 85 +++++++++++++++++++++++++++++++++++---------------- doc/grep.texi | 50 +++++++++++++++++++++++++----- 2 files changed, 101 insertions(+), 34 deletions(-) diff --git a/doc/grep.in.1 b/doc/grep.in.1 index 219f37f..6258846 100644 --- a/doc/grep.in.1 +++ b/doc/grep.in.1 @@ -2,7 +2,7 @@ .de dT .ds Dt \\$2 .. -.dT Time-stamp: "2018-05-11" +.dT Time-stamp: "2019-12-29" .\" Update the above date whenever a change to either this file or .\" grep.c's 'usage' function results in a nontrivial change to the man = page. .\" In Emacs, you can update the date by running 'M-x time-stamp' @@ -169,6 +169,11 @@ in each is one or patterns separated by newline characters, and .B grep prints each line that matches a pattern. +Typically +.I PATTERNS +should be quoted when +.B grep +is used in a shell command. .PP A .I FILE @@ -397,10 +402,10 @@ This is the default when there is only one file .BI \-\^\-label=3D LABEL Display input actually coming from standard input as input coming from f= ile .IR LABEL . -This is especially useful when implementing tools like -.BR zgrep , +This can be useful for commands that transform a file's contents +before searching, e.g., -.BR "gzip \-cd foo.gz | grep \-\^\-label=3Dfoo \-H something" . +.BR "gzip \-cd foo.gz | grep \-\^\-label=3Dfoo \-H 'some pattern'" . See also the .B \-H option. @@ -943,7 +948,18 @@ versions and .BR \e) . . -.SH "ENVIRONMENT VARIABLES" +.SH "EXIT STATUS" +Normally the exit status is 0 if a line is selected, 1 if no lines +were selected, and 2 if an error occurred. However, if the +.B \-q +or +.B \-\^\-quiet +or +.B \-\^\-silent +is used and a line is selected, the exit status is 0 even if an error +occurred. +. +.SH ENVIRONMENT The behavior of .B grep is affected by the following environment variables. @@ -1271,16 +1287,9 @@ when .B POSIXLY_CORRECT is not set. . -.SH "EXIT STATUS" -Normally the exit status is 0 if a line is selected, 1 if no lines -were selected, and 2 if an error occurred. However, if the -.B \-q -or -.B \-\^\-quiet -or -.B \-\^\-silent -is used and a line is selected, the exit status is 0 even if an error -occurred. +.SH NOTES +This man page is maintained only fitfully; +the full documentation is often more up-to-date. . .SH COPYRIGHT Copyright 1998\(en2000, 2002, 2005\(en2018 Free Software Foundation, Inc= . @@ -1319,16 +1328,43 @@ to run out of memory. .PP Back-references are very slow, and may require exponential time. . +.SH EXAMPLE +The following example outputs the location and contents of any line +containing \*(lqf\*(rq and ending in \*(lq.c\*(rq, +within all files in the current directory whose names +contain \*(lqg\*(rq and end in \*(lq.h\*(rq. +The command also searches the empty file /dev/null, +so that file names are displayed +even if only one file name happens to be of the form \*(lq*g*.h\*(rq. +.PP +.in +2n +.EX +$ \fBgrep\fP \-n 'f.*\e.c$' *g*.h /dev/null +argmatch.h:1:/* definitions and prototypes for argmatch.c +.EE +.in +.PP +The only line that matches is line 1 of 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. +. .SH "SEE ALSO" .SS "Regular Manual Pages" -awk(1), cmp(1), diff(1), find(1), gzip(1), -perl(1), sed(1), sort(1), xargs(1), zgrep(1), -read(2), -pcre(3), pcresyntax(3), pcrepattern(3), -terminfo(5), -glob(7), regex(7). -.SS "POSIX Programmer's Manual Page" -grep(1p). +.BR awk (1), +.BR cmp (1), +.BR diff (1), +.BR find (1), +.BR perl (1), +.BR sed (1), +.BR sort (1), +.BR xargs (1), +.BR read (2), +.BR pcre (3), +.BR pcresyntax (3), +.BR pcrepattern (3), +.BR terminfo (5), +.BR glob (7), +.BR regex(7). .SS "Full Documentation" A .UR https://www.gnu.org/software/grep/manual/ @@ -1345,9 +1381,6 @@ programs are properly installed at your site, the c= ommand .PP should give you access to the complete manual. . -.SH NOTES -This man page is maintained only fitfully; -the full documentation is often more up-to-date. .\" Work around problems with some troff -man implementations. .br . diff --git a/doc/grep.texi b/doc/grep.texi index 01ad5f7..873b53c 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -14,6 +14,18 @@ @c %**end of header =20 @documentencoding UTF-8 +@c These two require Texinfo 5.0 or later, so use the older +@c equivalent @set variables supported in 4.11 and later. +@ignore +@codequotebacktick on +@codequoteundirected on +@end ignore +@set txicodequoteundirected +@set txicodequotebacktick +@iftex +@c TeX sometimes fails to hyphenate, so help it here. +@hyphenation{spec-i-fied} +@end iftex =20 @copying This manual is for @command{grep}, a pattern matching engine. @@ -101,12 +113,12 @@ grep [@var{option}...] [@var{patterns}] [@var{file}= ...] @end example =20 @noindent - There can be zero or more @var{option} arguments, and zero or more @var{file} arguments. The @var{patterns} argument contains one or more patterns separated by newlines, and is omitted when patterns are given via the @samp{-e@ @var{patterns}} or @samp{-f@ @var{file}} -options. +options. Typically @var{patterns} should be quoted when +@command{grep} is used in a shell command. =20 @menu * Command-line Options:: Short and long names, grouped by categor= y. @@ -178,6 +190,8 @@ Use @var{patterns} as one or more patterns; newlines = within @var{patterns} separate each pattern from the next. If this option is used multiple times or is combined with the @option{-f} (@option{--file}) option, search for all patterns given. +Typically @var{patterns} should be quoted when @command{grep} is used +in a shell command. (@option{-e} is specified by POSIX.) =20 @item -f @var{file} @@ -337,7 +351,7 @@ This enables a calling process to resume a search. For example, the following shell script makes use of it: =20 @example -while grep -m 1 PATTERN +while grep -m 1 'PATTERN' do echo xxxx done < FILE @@ -349,7 +363,7 @@ file: @example # This probably will not work. cat FILE | -while grep -m 1 PATTERN +while grep -m 1 'PATTERN' do echo xxxx done @@ -449,12 +463,12 @@ This is the default when there is only one file @opindex --label @cindex changing name of standard input Display input actually coming from standard input -as input coming from file @var{LABEL}. This is -especially useful when implementing tools like -@command{zgrep}; e.g.: +as input coming from file @var{LABEL}. +This can be useful for commands that transform a file's contents +before searching; e.g.: =20 @example -gzip -cd foo.gz | grep --label=3Dfoo -H something +gzip -cd foo.gz | grep --label=3Dfoo -H 'some pattern' @end example =20 @item -n @@ -1565,6 +1579,26 @@ this is because @samp{.*} matches zero or more cha= racters within a line. 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. + +Here is a more complex example session, +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}. +The command also searches the empty file @file{/dev/null}, +so that file names are displayed +even if only one file name happens to be of the form @samp{*g*.h}. + +@example +$ @kbd{grep -n 'f.*\.c$' *g*.h /dev/null} +argmatch.h:1:/* definitions and prototypes for argmatch.c +@end example + +@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. + @xref{Invoking}, for more details about how to invoke @command{grep}. =20 --=20 2.17.1 --------------2631300642B7C8DA4A7171FD Content-Type: text/x-patch; charset=UTF-8; name="0002-doc-fix-typo-in-previous-patch.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0002-doc-fix-typo-in-previous-patch.patch" >From 42eee261adf55da069fab362cccfbda00a7f88ab Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 29 Dec 2019 10:44:45 -0800 Subject: [PATCH 2/2] doc: fix typo in previous patch --- doc/grep.in.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/grep.in.1 b/doc/grep.in.1 index 6258846..f52cc87 100644 --- a/doc/grep.in.1 +++ b/doc/grep.in.1 @@ -1364,7 +1364,7 @@ from the globbing syntax that the shell uses to match file names. .BR pcrepattern (3), .BR terminfo (5), .BR glob (7), -.BR regex(7). +.BR regex (7). .SS "Full Documentation" A .UR https://www.gnu.org/software/grep/manual/ -- 2.17.1 --------------2631300642B7C8DA4A7171FD-- From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 29 14:00:23 2019 Received: (at submit) by debbugs.gnu.org; 29 Dec 2019 19:00:23 +0000 Received: from localhost ([127.0.0.1]:60236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ildna-0007g2-MB for submit@debbugs.gnu.org; Sun, 29 Dec 2019 14:00:22 -0500 Received: from lists.gnu.org ([209.51.188.17]:46309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ildnY-0007fu-TI for submit@debbugs.gnu.org; Sun, 29 Dec 2019 14:00:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57223) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ildnX-0004Fp-Jk for bug-grep@gnu.org; Sun, 29 Dec 2019 14:00:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_50,FREEMAIL_FROM, KHOP_HELO_FCRDNS,RDNS_DYNAMIC autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ildnV-00015Y-L2 for bug-grep@gnu.org; Sun, 29 Dec 2019 14:00:19 -0500 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:51606 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ildnU-00011x-S7 for bug-grep@gnu.org; Sun, 29 Dec 2019 14:00:17 -0500 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1ildnQ-0014i7-3M for bug-grep@gnu.org; Sun, 29 Dec 2019 20:00:12 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-grep@gnu.org From: Stephane Chazelas Subject: Re: bug#38792: man grep Date: Sun, 29 Dec 2019 18:56:30 +0000 Message-ID: <20191229185630.bakmuso2z5acphfc@chaz.gmail.com> References: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: NeoMutt/20180716 Content-Disposition: inline In-Reply-To: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: submit 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: -1.9 (-) 2019-12-29 15:24:47 +0100, Martin Simons: [...] > martin@laptop:~/test$ grep 'Jantje*' school.txt > Which delivers the desired output: > Jantje It also matches on Jantj? The * regexp operator matches 0 or more of the preceding atom. So e* matches 0 or more "e"s. It's not to confused with the "*" shell wildcard operator. In effect, that's equivalent to grep Jantj school.txt [...] > martin@laptop:~/test$ grep Jantje* school.txt > Delivering this undesired output: > Jantjes:Jantje zag eens pruimen hangen > Jantjes:en Jantje wilde pruimen plukken voor zijn moeder > Jantjes:toen zei Jantjes moeder > Jantjes:pas toch op Jantje! > school.txt:Jantje > school.txt:Ik las dat Jantje > school.txt:Jantje voortaan op tijd op school komt, > school.txt:Hoogachtend, Jantjes vader, Piet Bel. > > In trying to give more weight to the argument I pointed the students to the > man page of grep, but it struck me that there is not a single reference to > the need of using quotes in the search pattern. This does not help. All grep receives is a list of arguments. That * needs to be quoted for the shell not to treat it as a glob operator, not for grep. You'll find explanation of shell globbing (aka filename generation, aka pathname expansion, aka filename expansion) and the effect of quoting on it in your shell manual. For the GNU shell, that's with: info bash 'filename expansion' What needs to be quoted for a given shell varies with the shell implementation, grep has nothing to do with that. -- Stephane From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 29 14:15:17 2019 Received: (at submit) by debbugs.gnu.org; 29 Dec 2019 19:15:17 +0000 Received: from localhost ([127.0.0.1]:60245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ile21-00080a-AG for submit@debbugs.gnu.org; Sun, 29 Dec 2019 14:15:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:57084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ile1z-00080R-Ag for submit@debbugs.gnu.org; Sun, 29 Dec 2019 14:15:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38717) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ile1y-0006Ue-8s for bug-grep@gnu.org; Sun, 29 Dec 2019 14:15:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_50,FREEMAIL_FROM, KHOP_HELO_FCRDNS,RDNS_DYNAMIC autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ile1x-0004sk-7k for bug-grep@gnu.org; Sun, 29 Dec 2019 14:15:14 -0500 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:37744 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ile1w-0004my-VP for bug-grep@gnu.org; Sun, 29 Dec 2019 14:15:13 -0500 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1ile1t-000C79-OT for bug-grep@gnu.org; Sun, 29 Dec 2019 20:15:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-grep@gnu.org From: Stephane Chazelas Subject: Re: bug#38792: man grep Date: Sun, 29 Dec 2019 19:10:51 +0000 Message-ID: <20191229191051.lvnqaunhjouhadq7@chaz.gmail.com> References: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> <54460c40-9419-89f8-ab6b-7f45d75adf57@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: NeoMutt/20180716 Content-Disposition: inline In-Reply-To: <54460c40-9419-89f8-ab6b-7f45d75adf57@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: submit 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: -1.9 (-) 2019-12-29 10:46:10 -0800, Paul Eggert: > On 12/29/19 6:24 AM, Martin Simons wrote: > > It may not be the task of the grep project to provide a man page, but even then I > > feel there is an opportunity for improvement here > > Right on both counts. I installed the attached patches to improve things a bit > in the next version of grep. [...] > From 8b7da49786e613c6ae9a2b299b1ce2187b32ed26 Mon Sep 17 00:00:00 2001 > Subject: [PATCH 1/2] doc: document quoting better [...] > +.SH "EXIT STATUS" > +Normally the exit status is 0 if a line is selected, 1 if no lines > +were selected, and 2 if an error occurred. [...] Note that that wording makes it unclear what the exit status should be if -o is in use. [...] > +$ \fBgrep\fP \-n 'f.*\e.c$' *g*.h /dev/null [...] It should be grep -n -- 'f.*\.c$' *g*.h /dev/null Or: grep -ne 'f.*\.c$' -- *g*.h /dev/null (unless $POSIXLY_CORRECT is set). grep pattern *.h is fine in POSIX compliant greps, but not in GNU grep as GNU getopt*() accept options after non-option arguments. IMO, it's worth pointing out as it's a common gotchas with GNU utilities. grep -e pattern *.h is not fine in any grep. (why not using -H instead of /dev/null btw?). [...] > +@example > +$ @kbd{grep -n 'f.*\.c$' *g*.h /dev/null} > +argmatch.h:1:/* definitions and prototypes for argmatch.c > +@end example [...] same in texinfo. -- Stephane From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 29 21:59:33 2019 Received: (at 38792) by debbugs.gnu.org; 30 Dec 2019 02:59:33 +0000 Received: from localhost ([127.0.0.1]:60409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1illHJ-0006C3-Bs for submit@debbugs.gnu.org; Sun, 29 Dec 2019 21:59:33 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:52398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1illHG-0006Bl-4h for 38792@debbugs.gnu.org; Sun, 29 Dec 2019 21:59:31 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B226F160263; Sun, 29 Dec 2019 18:59:23 -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 RSszlAozc0iU; Sun, 29 Dec 2019 18:59:22 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C505C1604F9; Sun, 29 Dec 2019 18:59:22 -0800 (PST) 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 nL3BE9AI3GjP; Sun, 29 Dec 2019 18:59:22 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9D4A6160263; Sun, 29 Dec 2019 18:59:22 -0800 (PST) Subject: Re: bug#38792: man grep To: Stephane Chazelas References: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> <54460c40-9419-89f8-ab6b-7f45d75adf57@cs.ucla.edu> <20191229191051.lvnqaunhjouhadq7@chaz.gmail.com> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <886b702b-621b-c0fc-0041-a2f25250d56d@cs.ucla.edu> Date: Sun, 29 Dec 2019 18:59:22 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191229191051.lvnqaunhjouhadq7@chaz.gmail.com> Content-Type: multipart/mixed; boundary="------------1FD6197353589DF06BC0E0F1" Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38792 Cc: 38792@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. --------------1FD6197353589DF06BC0E0F1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 12/29/19 11:10 AM, Stephane Chazelas wrote: > Note that that wording makes it unclear what the exit status > should be if -o is in use. It seems reasonably clear that a line would be selected if any part of it is selected. Anyway, that text is exactly the same as before, so rewordsmithing it could be a different thread. > It should be > > grep -n -- 'f.*\.c$' *g*.h /dev/null Thanks, done in the attached patch. > (why not using -H instead of /dev/null btw?). I wanted the example to be portable. --------------1FD6197353589DF06BC0E0F1 Content-Type: text/x-patch; charset=UTF-8; name="0001-doc-Add-to-more-complex-example.patch" Content-Disposition: attachment; filename="0001-doc-Add-to-more-complex-example.patch" Content-Transfer-Encoding: quoted-printable >From b39fd2ad27ee5deeb9a0f7571034628c588bdda9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 29 Dec 2019 18:57:28 -0800 Subject: [PATCH] doc: Add -- to more-complex example MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Suggested by Stephane Chazelas (Bug#38792). * doc/grep.in.1, doc/grep.texi: Add =E2=80=98--=E2=80=99 to recently-adde= d example. --- doc/grep.in.1 | 11 ++++++++--- doc/grep.texi | 7 ++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/grep.in.1 b/doc/grep.in.1 index a382966..a91b2a6 100644 --- a/doc/grep.in.1 +++ b/doc/grep.in.1 @@ -1333,13 +1333,18 @@ The following example outputs the location and co= ntents of any line containing \*(lqf\*(rq and ending in \*(lq.c\*(rq, within all files in the current directory whose names contain \*(lqg\*(rq and end in \*(lq.h\*(rq. -The command also searches the empty file /dev/null, -so that file names are displayed +The +.B \-n +option outputs line numbers, the +.B \-\- +argument treats expansions of \*(lq*g*.h\*(rq starting with \*(lq\-\*(rq +as file names not options, +and the empty file /dev/null causes file names to be output even if only one file name happens to be of the form \*(lq*g*.h\*(rq. .PP .in +2n .EX -$ \fBgrep\fP \-n 'f.*\e.c$' *g*.h /dev/null +$ \fBgrep\fP \-n \-\- 'f.*\e.c$' *g*.h /dev/null argmatch.h:1:/* definitions and prototypes for argmatch.c .EE .in diff --git a/doc/grep.texi b/doc/grep.texi index 873b53c..42832ab 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -1585,12 +1585,13 @@ 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}. -The command also searches the empty file @file{/dev/null}, -so that file names are displayed +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 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} +$ @kbd{grep -n -- 'f.*\.c$' *g*.h /dev/null} argmatch.h:1:/* definitions and prototypes for argmatch.c @end example =20 --=20 2.17.1 --------------1FD6197353589DF06BC0E0F1-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 30 03:55:17 2019 Received: (at submit) by debbugs.gnu.org; 30 Dec 2019 08:55:17 +0000 Received: from localhost ([127.0.0.1]:60481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilqpY-0006Fe-Mb for submit@debbugs.gnu.org; Mon, 30 Dec 2019 03:55:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:37417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilqpW-0006FW-If for submit@debbugs.gnu.org; Mon, 30 Dec 2019 03:55:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43686) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilqpU-0004Fw-Nw for bug-grep@gnu.org; Mon, 30 Dec 2019 03:55:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=BAYES_50,FREEMAIL_FROM, KHOP_HELO_FCRDNS,RDNS_DYNAMIC autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilqpT-0006cc-4l for bug-grep@gnu.org; Mon, 30 Dec 2019 03:55:12 -0500 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:52222 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ilqpS-0006c4-TG for bug-grep@gnu.org; Mon, 30 Dec 2019 03:55:11 -0500 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1ilqpQ-0003Eb-Qk for bug-grep@gnu.org; Mon, 30 Dec 2019 09:55:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-grep@gnu.org From: Stephane Chazelas Subject: Re: bug#38792: man grep Date: Mon, 30 Dec 2019 08:52:26 +0000 Message-ID: <20191230085226.gqcss3bizjefyyc7@chaz.gmail.com> References: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> <54460c40-9419-89f8-ab6b-7f45d75adf57@cs.ucla.edu> <20191229191051.lvnqaunhjouhadq7@chaz.gmail.com> <886b702b-621b-c0fc-0041-a2f25250d56d@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: NeoMutt/20180716 Content-Disposition: inline In-Reply-To: <886b702b-621b-c0fc-0041-a2f25250d56d@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: submit 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: -1.9 (-) 2019-12-29 18:59:22 -0800, Paul Eggert: [...] > > It should be > > > > grep -n -- 'f.*\.c$' *g*.h /dev/null > > Thanks, done in the attached patch. [...] There were a few other instances. The patch below attempts to fix those (includes your patch). I've also replaced find|xargs to the standard and more portable (and simpler/faster...) find -exec + (GNU find used not to support that but that was eventually fixed over 10 years ago). I've replaced the POSIX+XSI ps -e with POSIX ps -A (for BSD compatibility). I've moved the grep -H and grep -- FAQ entries to the front so they are explained before being used. diff --git a/doc/grep.in.1 b/doc/grep.in.1 index a382966..a91b2a6 100644 --- a/doc/grep.in.1 +++ b/doc/grep.in.1 @@ -1333,13 +1333,18 @@ The following example outputs the location and contents of any line containing \*(lqf\*(rq and ending in \*(lq.c\*(rq, within all files in the current directory whose names contain \*(lqg\*(rq and end in \*(lq.h\*(rq. -The command also searches the empty file /dev/null, -so that file names are displayed +The +.B \-n +option outputs line numbers, the +.B \-\- +argument treats expansions of \*(lq*g*.h\*(rq starting with \*(lq\-\*(rq +as file names not options, +and the empty file /dev/null causes file names to be output even if only one file name happens to be of the form \*(lq*g*.h\*(rq. .PP .in +2n .EX -$ \fBgrep\fP \-n 'f.*\e.c$' *g*.h /dev/null +$ \fBgrep\fP \-n \-\- 'f.*\e.c$' *g*.h /dev/null argmatch.h:1:/* definitions and prototypes for argmatch.c .EE .in diff --git a/doc/grep.texi b/doc/grep.texi index 873b53c..de7d028 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -1585,12 +1585,13 @@ 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}. -The command also searches the empty file @file{/dev/null}, -so that file names are displayed +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 output even if only one file name happens to be of the form @samp{*g*.h}. @example -$ @kbd{grep -n 'f.*\.c$' *g*.h /dev/null} +$ @kbd{grep -n -- 'f.*\.c$' *g*.h /dev/null} argmatch.h:1:/* definitions and prototypes for argmatch.c @end example @@ -1608,11 +1609,78 @@ Here are some common questions and answers about @command{grep} usage. @enumerate +@item +How do I force @command{grep} to print the name of the file? + +Append @file{/dev/null}: + +@example +grep 'eli' /etc/passwd /dev/null +@end example + +gets you: + +@example +/etc/passwd:eli:x:2098:1000:Eli Smith:/home/eli:/bin/bash +@end example + +Alternatively, use @option{-H}, which is a GNU extension: + +@example +grep -H 'eli' /etc/passwd +@end example + +Using that trick is generally wanted when using @command{find}, shell +globbing or other forms of expansions or more generally when we don't +know in advance what file are being searched in and want that +information to be returned. Without it + +@example +grep -- pattern *.txt +@end example + +could output the matched lines without indication of which file they +were found in if there was only one non-hidden @samp{.txt} file in the +current directory. + +@item +What if a pattern or filename has a leading @samp{-}? + +@example +grep -H -- '--cut here--' * +@end example + +@noindent +searches for all lines matching @samp{--cut here--}. + +@samp{--} marks the end of options. None of the arguments after +@samp{--} are treated as options even if they start with +@samp{-}. + +Alternatively, one can use @option{-e} to specify the pattern: + +@example +grep -H -e '--cut here--' -- * +@end example + +But @samp{--} is still needed to guard against filenames that +start with @samp{-}. + +Another approach would be to use: + +@example +grep -H -e '--cut here--' ./* +@end example + +Which also guards against a file called @samp{-} (which +@command{grep} would otherwise interpret as meaning standard +input). + @item How can I list just the names of matching files? @example -grep -l 'main' *.c +grep -l -- 'main' *.c @end example @noindent @@ -1630,45 +1698,33 @@ grep -r 'hello' /home/gigi searches for @samp{hello} in all files under the @file{/home/gigi} directory. For more control over which files are searched, -use @command{find}, @command{grep}, and @command{xargs}. +use @command{find} in combination with @command{grep}. For example, the following command searches only C files: @example -find /home/gigi -name '*.c' -print0 | xargs -0r grep -H 'hello' +find /home/gigi -name '*.c' -exec grep -H 'hello' '@{@}' + @end example This differs from the command: @example -grep -H 'hello' *.c +grep -H -- 'hello' *.c @end example -which merely looks for @samp{hello} in all files in the current -directory whose names end in @samp{.c}. +which merely looks for @samp{hello} in all (non-hidden) files in +the current directory whose names end in @samp{.c}. The @samp{find ...} command line above is more similar to the command: @example -grep -rH --include='*.c' 'hello' /home/gigi +grep -r --include='*.c' 'hello' /home/gigi @end example -@item -What if a pattern has a leading @samp{-}? - -@example -grep -e '--cut here--' * -@end example - -@noindent -searches for all lines matching @samp{--cut here--}. -Without @option{-e}, -@command{grep} would attempt to parse @samp{--cut here--} as a list of -options. @item Suppose I want to search for a whole word, not a part of a word? @example -grep -w 'hello' * +grep -H -w -- 'hello' * @end example @noindent @@ -1679,7 +1735,7 @@ For more control, use @samp{\<} and For example: @example -grep 'hello\>' * +grep -H -- 'hello\>' * @end example @noindent @@ -1690,38 +1746,17 @@ searches only for words ending in @samp{hello}, so it matches the word How do I output context around the matching lines? @example -grep -C 2 'hello' * +grep -H -C 2 -- 'hello' * @end example @noindent prints two lines of context around each matching line. -@item -How do I force @command{grep} to print the name of the file? - -Append @file{/dev/null}: - -@example -grep 'eli' /etc/passwd /dev/null -@end example - -gets you: - -@example -/etc/passwd:eli:x:2098:1000:Eli Smith:/home/eli:/bin/bash -@end example - -Alternatively, use @option{-H}, which is a GNU extension: - -@example -grep -H 'eli' /etc/passwd -@end example - @item Why do people use strange regular expressions on @command{ps} output? @example -ps -ef | grep '[c]ron' +ps -Af | grep '[c]ron' @end example If the pattern had been written without the square brackets, it would @@ -1788,6 +1823,9 @@ Use the special file name @samp{-}: cat /etc/passwd | grep 'alain' - /etc/motd @end example +To match in a file called @samp{-} in the current directory, use +@samp{./-}. + @item @cindex palindromes How to express palindromes in a regular expression? diff --git a/gnulib b/gnulib --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 575b0ecbad2f34d5777f9562eebc2d0c815bfc5c +Subproject commit 575b0ecbad2f34d5777f9562eebc2d0c815bfc5c-dirty From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 30 04:59:20 2019 Received: (at 38792) by debbugs.gnu.org; 30 Dec 2019 09:59:20 +0000 Received: from localhost ([127.0.0.1]:60506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilrpY-0007mS-FT for submit@debbugs.gnu.org; Mon, 30 Dec 2019 04:59:20 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:54872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilrpV-0007mE-GV for 38792@debbugs.gnu.org; Mon, 30 Dec 2019 04:59:18 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1C4651600CC; Mon, 30 Dec 2019 01:59:11 -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 TTlxXY6SIW8l; Mon, 30 Dec 2019 01:59:10 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2269E160263; Mon, 30 Dec 2019 01:59:10 -0800 (PST) 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 uk4be4tkMnIm; Mon, 30 Dec 2019 01:59:10 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id ECEF51600CC; Mon, 30 Dec 2019 01:59:09 -0800 (PST) Subject: Re: bug#38792: man grep To: Stephane Chazelas References: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> <54460c40-9419-89f8-ab6b-7f45d75adf57@cs.ucla.edu> <20191229191051.lvnqaunhjouhadq7@chaz.gmail.com> <886b702b-621b-c0fc-0041-a2f25250d56d@cs.ucla.edu> <20191230085226.gqcss3bizjefyyc7@chaz.gmail.com> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <28cdc645-24ca-7ec9-b756-f80d1ebb9334@cs.ucla.edu> Date: Mon, 30 Dec 2019 01:59:09 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191230085226.gqcss3bizjefyyc7@chaz.gmail.com> Content-Type: multipart/mixed; boundary="------------B74F4DF47EEB7DFE69EA8F2F" Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38792 Cc: 38792@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. --------------B74F4DF47EEB7DFE69EA8F2F Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Thanks, I installed the attached, which is a bit more conservative than what you suggested but which I hope catches all the issues. --------------B74F4DF47EEB7DFE69EA8F2F Content-Type: text/x-patch; charset=UTF-8; name="0001-doc-robustify-some-examples.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-doc-robustify-some-examples.patch" >From fdee61d847ed6c78901bd5620f1d421c51468181 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 30 Dec 2019 01:56:36 -0800 Subject: [PATCH] doc: robustify some examples Prompted by suggestions by Stephane Chazelas (Bug#38792#20). * doc/grep.texi (Usage): Make examples more robust. --- doc/grep.texi | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/doc/grep.texi b/doc/grep.texi index 13b8df0..aceaf33 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -1615,11 +1615,11 @@ Here are some common questions and answers about @command{grep} usage. How can I list just the names of matching files? @example -grep -l 'main' *.c +grep -l 'main' test-*.c @end example @noindent -lists the names of all C files in the current directory whose contents +lists names of @samp{test-*.c} files in the current directory whose contents mention @samp{main}. @item @@ -1633,45 +1633,54 @@ grep -r 'hello' /home/gigi searches for @samp{hello} in all files under the @file{/home/gigi} directory. For more control over which files are searched, -use @command{find}, @command{grep}, and @command{xargs}. +use @command{find} and @command{grep}. For example, the following command searches only C files: @example -find /home/gigi -name '*.c' -print0 | xargs -0r grep -H 'hello' +find /home/gigi -name '*.c' ! -type d \ + -exec grep -H 'hello' '@{@}' + @end example This differs from the command: @example -grep -H 'hello' *.c +grep -H 'hello' /home/gigi/*.c @end example -which merely looks for @samp{hello} in all files in the current -directory whose names end in @samp{.c}. -The @samp{find ...} command line above is more similar to the command: +which merely looks for @samp{hello} in non-hidden C files in +@file{/home/gigi} whose names end in @samp{.c}. +The @command{find} command line above is more similar to the command: @example -grep -rH --include='*.c' 'hello' /home/gigi +grep -r --include='*.c' 'hello' /home/gigi @end example @item -What if a pattern has a leading @samp{-}? +What if a pattern or file has a leading @samp{-}? @example -grep -e '--cut here--' * +grep -- '--cut here--' * @end example @noindent searches for all lines matching @samp{--cut here--}. -Without @option{-e}, +Without @option{--}, @command{grep} would attempt to parse @samp{--cut here--} as a list of -options. +options, and there would be similar problems with any file names +beginning with @samp{-}. + +Alternatively, you can prevent misinterpretation of leading @samp{-} +by using @option{-e} for patterns and leading @samp{./} for files: + +@example +grep -e '--cut here--' ./* +@end example @item Suppose I want to search for a whole word, not a part of a word? @example -grep -w 'hello' * +grep -w 'hello' test*.log @end example @noindent @@ -1682,7 +1691,7 @@ For more control, use @samp{\<} and For example: @example -grep 'hello\>' * +grep 'hello\>' test*.log @end example @noindent @@ -1693,7 +1702,7 @@ searches only for words ending in @samp{hello}, so it matches the word How do I output context around the matching lines? @example -grep -C 2 'hello' * +grep -C 2 'hello' test*.log @end example @noindent @@ -1775,7 +1784,7 @@ Why does the empty pattern match every input line? The @command{grep} command searches for lines that contain strings that match a pattern. Every line contains the empty string, so an empty pattern causes @command{grep} to find a match on each line. It -is not the only such pattern: @samp{^}, @samp{$}, @samp{.*}, and many +is not the only such pattern: @samp{^}, @samp{$}, and many other patterns cause @command{grep} to match every line. To match empty lines, use the pattern @samp{^$}. To match blank -- 2.17.1 --------------B74F4DF47EEB7DFE69EA8F2F-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 30 12:54:36 2019 Received: (at 38792) by debbugs.gnu.org; 30 Dec 2019 17:54:36 +0000 Received: from localhost ([127.0.0.1]:33337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilzFU-0006qD-Eq for submit@debbugs.gnu.org; Mon, 30 Dec 2019 12:54:36 -0500 Received: from mail-wm1-f46.google.com ([209.85.128.46]:54498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilzFR-0006q0-PH for 38792@debbugs.gnu.org; Mon, 30 Dec 2019 12:54:34 -0500 Received: by mail-wm1-f46.google.com with SMTP id b19so156983wmj.4 for <38792@debbugs.gnu.org>; Mon, 30 Dec 2019 09:54:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jw/2QDc1DvoRBlcVn1UyLZ2WylyDm0O/nvcR8wHN4vg=; b=URiZ2PbYRjJFyiMclfMdr+fKeuUlPxY/RvsI+RhmlJM/pwJDnPabU0et7rWHMkxWrb mFqLPw5+TQ08ckPFq8qYberHTwZ19bUpdtpuBLd0aIu/xQUvahm/rPEBrzKTDiPYa41N GWntVsEQQKdywP/iWZCjQsNOTfIjCmSF+pKvLYlwj8LgXYM1ptIHCuxUHiPbNZZWmp3m NzNq369x4eUJjSv/G670wWjldpxwsbixi3G0b0W1jM3tV4maFMtJsNklRKpTK+FJh17j f9LiavoIAu+b4obOU637Izety6kAVVhePlGyzvXKWekCD2gE0/ZPGOJOkj+qhARWCtTk tjvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jw/2QDc1DvoRBlcVn1UyLZ2WylyDm0O/nvcR8wHN4vg=; b=lkx0BGhLZaWSMHFHE8qS7/LTsF9jtpdgjoaFEW6B3ZZZtw13pSM5rrk/UlrghxCtgw l4m1iELxGvOgEEOM9EhjuNsydgC9s4UpNaIv5Tj1NgF3mNSy6VCbbOOQXM7bPbAb1JjV dLqtKXisMCIi1KdcvvR4hcij8HrzRpGtRlnikqrW2ydsMOZXLVwQHNVkqAqzgZgHBBXe ZcKgyo/PDbXAiWsW0Sh8GByYclaX4u9ycBShxQ0ykq/qdwf/IZQ4bXKNZeyxinEr5++w wIBUQKrERSmhmIeM1+N9OwJgo+2mxHqTETypiTghMLXl8xgHPcxYNAqCIDoSz2zoHfj8 qJ+g== X-Gm-Message-State: APjAAAUzN759OYrDy60XKWe+nlRrdMF7w5FToq8ZYMOUczMaJ7AlnZdl ldMvUlB/X13JiN94UDFc69o= X-Google-Smtp-Source: APXvYqyjpj0Tu8KaIxAgaoHCnBnbLcU28xkehbU0qiAho804OBKzOnAHKI1onCIKCv80h1EBBbfdPw== X-Received: by 2002:a05:600c:20c7:: with SMTP id y7mr188846wmm.21.1577728467873; Mon, 30 Dec 2019 09:54:27 -0800 (PST) Received: from chaz.gmail.com ([2.127.75.28]) by smtp.gmail.com with ESMTPSA id w17sm47776620wrt.89.2019.12.30.09.54.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2019 09:54:27 -0800 (PST) Date: Mon, 30 Dec 2019 17:54:26 +0000 From: Stephane Chazelas To: Paul Eggert Subject: Re: bug#38792: man grep Message-ID: <20191230175426.d6t7j5bvtcvkg4zs@chaz.gmail.com> References: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> <54460c40-9419-89f8-ab6b-7f45d75adf57@cs.ucla.edu> <20191229191051.lvnqaunhjouhadq7@chaz.gmail.com> <886b702b-621b-c0fc-0041-a2f25250d56d@cs.ucla.edu> <20191230085226.gqcss3bizjefyyc7@chaz.gmail.com> <28cdc645-24ca-7ec9-b756-f80d1ebb9334@cs.ucla.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28cdc645-24ca-7ec9-b756-f80d1ebb9334@cs.ucla.edu> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38792 Cc: 38792@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: -1.0 (-) 2019-12-30 01:59:09 -0800, Paul Eggert: > Thanks, I installed the attached, which is a bit more conservative than what you > suggested but which I hope catches all the issues. [...] > @example > -grep -l 'main' *.c > +grep -l 'main' test-*.c > @end example [...] Thanks, though I find it's a bit of a shame to /hide/ the problem like that here. It's so common for people to forget that "--" (I just came across https://en.wikipedia.org/wiki/Glob_(programming) which does that mistake in the very first paragraph for instance) that it would be beneficial IMO if the manual showed the right way to do, especially for the GNU implementation of grep which makes the problem worse by accepting options after non-option arguments. Please consider making it grep -l -- 'main' *.c to raise awareness and try and teach people "the right way". -- Stephane From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 30 13:45:49 2019 Received: (at 38792) by debbugs.gnu.org; 30 Dec 2019 18:45:49 +0000 Received: from localhost ([127.0.0.1]:33395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1im032-00085G-UJ for submit@debbugs.gnu.org; Mon, 30 Dec 2019 13:45:49 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:52670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1im030-000851-Sq for 38792@debbugs.gnu.org; Mon, 30 Dec 2019 13:45:48 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 70AC41600CC; Mon, 30 Dec 2019 10:45:39 -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 uPrYepsI74lW; Mon, 30 Dec 2019 10:45:38 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C521B1604F5; Mon, 30 Dec 2019 10:45:38 -0800 (PST) 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 wfDRPqBwKtRQ; Mon, 30 Dec 2019 10:45:38 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A09E41600CC; Mon, 30 Dec 2019 10:45:38 -0800 (PST) Subject: Re: bug#38792: man grep To: Stephane Chazelas References: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> <54460c40-9419-89f8-ab6b-7f45d75adf57@cs.ucla.edu> <20191229191051.lvnqaunhjouhadq7@chaz.gmail.com> <886b702b-621b-c0fc-0041-a2f25250d56d@cs.ucla.edu> <20191230085226.gqcss3bizjefyyc7@chaz.gmail.com> <28cdc645-24ca-7ec9-b756-f80d1ebb9334@cs.ucla.edu> <20191230175426.d6t7j5bvtcvkg4zs@chaz.gmail.com> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Mon, 30 Dec 2019 10:45:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191230175426.d6t7j5bvtcvkg4zs@chaz.gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38792 Cc: 38792@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 12/30/19 9:54 AM, Stephane Chazelas wrote: > Please consider making it > > > grep -l -- 'main' *.c > > to raise awareness and try and teach people "the right way". Interactively, I invariably use 'grep foo *.c' without the '--' and it works just fine because the files under my control have names that do not start with '-'. This is standard practice and simplifies the common-usage examples. So although '--' should (and does) appear in examples to document a defensive measure for scripts that must work even in nonstandard environments, '--' needn't be used in examples everywhere that it could conceivably apply. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 21 15:10:06 2020 Received: (at 38792-done) by debbugs.gnu.org; 21 Sep 2020 19:10:06 +0000 Received: from localhost ([127.0.0.1]:56220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKRCQ-0007lm-1b for submit@debbugs.gnu.org; Mon, 21 Sep 2020 15:10:06 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:48114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKRCN-0007l9-U2 for 38792-done@debbugs.gnu.org; Mon, 21 Sep 2020 15:10:05 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 799951600FF; Mon, 21 Sep 2020 12:09:58 -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 GI-HzzZMOLwI; Mon, 21 Sep 2020 12:09:57 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D3D341600F1; Mon, 21 Sep 2020 12:09:57 -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 aUYx4pO8jsRd; Mon, 21 Sep 2020 12:09:57 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-243-218-95.socal.res.rr.com [23.243.218.95]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id F251D1600FF; Mon, 21 Sep 2020 12:09:56 -0700 (PDT) Subject: Re: bug#38792: man grep From: Paul Eggert To: Stephane Chazelas References: <3bbdf68d246ac145de29499776e503c1@webhuis.nl> <54460c40-9419-89f8-ab6b-7f45d75adf57@cs.ucla.edu> <20191229191051.lvnqaunhjouhadq7@chaz.gmail.com> <886b702b-621b-c0fc-0041-a2f25250d56d@cs.ucla.edu> <20191230085226.gqcss3bizjefyyc7@chaz.gmail.com> <28cdc645-24ca-7ec9-b756-f80d1ebb9334@cs.ucla.edu> <20191230175426.d6t7j5bvtcvkg4zs@chaz.gmail.com> Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzRHT1JmOHZqRzJTZjF0azVlVThN Qml5Ti9iClowM2JLTmpOWU1wT0REUVF3dVA4NGtZTGtYMndCeHhNQWhCeHdiRFZadWR6eERa SjFDMlZYdWpDT0pWeHEya2wKakJNOUVUWXVVR3FkNzVBVzJMWHJMdzYrTXVJc0hGQVlBZ1Jy NytLY3dEZ0JBZndoUEJZWDM0blNTaUhsbUxDKwpLYUhMZUNMRjVaSTJ2S20zSEVlQ1R0bE9n N3haRU9OZ3d6TCtmZEtvK0Q2U29DOFJSeEpLczhhM3NWZkk0dDZDCm5yUXp2SmJCbjZneGRn Q3U1aTI5SjFRQ1lyQ1l2cWwyVXlGUEFLK2RvOTkvMWpPWFQ0bTI4MzZqMXdBUkFRQUIKdENC UVlYVnNJRVZuWjJWeWRDQThaV2RuWlhKMFFHTnpMblZqYkdFdVpXUjFQb2tDVlFRVEFRZ0FQ d0liQXdZTApDUWdIQXdJR0ZRZ0NDUW9MQkJZQ0F3RUNIZ0VDRjRBV0lRUitONUtwMkt6MzFq TzhGWWp0bCtrT1lxcCtOQVVDClh5Vzlsd1VKRks0THN3QUtDUkR0bCtrT1lxcCtOS05WRC85 SE1zSTE2MDZuMFV1VFhId0lUc3lPakFJOVNET1QKK0MzRFV2NnFsTTVCSDJuV0FNVGlJaXlB NXVnbHNKdjkzb2kydk50RmYvUS9tLzFjblpXZ25WbkV4a3lMSTRFTgpTZDF1QnZyMC9sQ1Nk UGxQME1nNkdXU3BYTXUreDB2ZFQwQWFaTk9URTBGblB1b2xkYzNYRDc2QzJxZzhzWC9pCmF4 WFRLSHk5UCtCbEFxL0NzNy9weERRMEV6U24wVVNaMkMwbDV2djRQTXBBL3BpY25TNks2MDlK dkRHYU9SbXcKWmVYSVpxUU5aVitaUXMrVVl0Vm9ndURUcWJ5M0lVWTFJOEJsWEhScHRhajlB TW40VW9oL0NxcFFsVm9qb3lXbApIcWFGbm5KQktlRjBodko5U0F5YWx3dXpBakc3dlFXMDdN WW5jYU9GbTB3b2lLYmc1SkxPOEY0U0JUSWt1TzBECkNmOW5MQWF5NlZzQjRyendkRWZSd2pQ TFlBbjdNUjNmdkhDRXpmcmtsZFRyYWlCTzFUMGllREs4MEk3c0xmNnAKTWVDWUkxOXBVbHgw L05STUdDZGRpRklRZGZ0aEtXWEdSUzVMQXM4andCZjhINkc1UFdpblByRUlhb21JUDIxaQp2 dWhRRDA3YllxOUlpSWRlbGpqVWRIY0dJMGkvQjRNNTZaYWE4RmYzOGluaU9sckRZQ21ZV1I0 ZENXWml1UWVaCjNPZ3FlUXM5YTZqVHZnZERHVm1SVnFZK2p6azhQbGFIZmNvazhST2hGY0hL a2NmaHVCaEwyNWhsUklzaFJET0UKc2tYcUt3bnpyYnFnYTNHWFpYZnNYQW9GYnpOaExkTHY5 QStMSkFZU2tYUDYvNXFkVHBFTFZHb3N5SDg4NFZkYgpCcGtHSTA0b1lWcXVsYmtDRFFSTWdI SmtBUkFBcG9YcnZ4UDNESWZqQ05PdFhVL1Bkd01TaEtkWC9SbFNzNVBmCnVuVjF3YktQOGhl clhIcnZRZEZWcUVDYVRTeG1saHpiazhYMFBrWTlnY1ZhVTJPNDlUM3FzT2QxY0hlRjUyWUYK R0V0MExoc0JlTWpnTlg1dVoxVjc2cjhneWVWbEZwV1diMFNJd0pVQkhyRFhleEY2N3VwZVJi MnZkSEJqWUROZQp5U24rMEI3Z0ZFcXZWbVp1K0xhZHVkRHA2a1FMamF0RnZIUUhVU0dOc2hC bmtrY2FUYmlJOVBzdDBHQ2MyYWl6Cm5CaVBQQTJXUXhBUGxQUmgzT0dUc241VEhBRG1ianFZ NkZFTUxhc1ZYOERTQ2JsTXZMd05lTy84U3h6aUJpZGgKcUxwSkNxZFFSV0hrdTVYeGdJa0dl S096NU9MRHZYSFdKeWFmckVZamprUzZBazZCNXo2c3ZLbGlDbFduakhRYwpqbFB6eW9GRmdL VEVmY3FEeENqNFJZMEQwRGd0RkQwTmZ5ZU9pZHJTQi9TelRlMmh3cnlRRTNycFNpcW8rMGNH CmR6aDR5QUhLWUorVXJYWjRwOTNaaGpHZktEMXhsck5ZRGxXeVc5UEdtYnZxRnVEbWlJQVFm OVdEL3d6RWZJQ2MKK0YrdURESSt1WWtSeFVGcDkyeWttZGhERUZnMXlqWXNVOGlHVTY5YUh5 dmhxMzZ6NHpjdHZicWhSTnpPV0IxYgpWSi9kSU1EdnNFeEdjWFFWRElUN3NETlh2MHdFM2pL U0twcDdOREcxb1hVWEwrMitTRjk5S2p5NzUzQWJRU0FtCkg2MTdmeUJOd2hKV3ZRWWcrbVV2 UHBpR090c2VzOUVYVUkzbFM0djBNRWFQRzQzZmxFczFVUisxcnBGUVdWSG8KMXkxT08rc0FF UUVBQVlrQ1BBUVlBUWdBSmdJYkRCWWhCSDQza3FuWXJQZldNN3dWaU8yWDZRNWlxbjQwQlFK ZgpKYjJ6QlFrVXJndlBBQW9KRU8yWDZRNWlxbjQwY25NUC8xN0NnVWtYVDlhSUpyaVBNOHdi Y2VZcmNsNytiZFlFCmY3OVNsd1NiYkhON1I0Q29JSkZPbE45Uy8zNHR5cEdWWXZwZ21DSkRZ RlRCeHlQTzkyaU1YRGdBNCtjV0h6dDUKVDFhWU85aHNLaGg3dkR0Sys2UHJvWkdjKzA4Z1VU WEhoYjk3aE1NUWhrbkpsbmZqcFNFQzllbTkwNkZVK0k5MwpUMWZUR3VwbkJhM2FXY0s4ak0w SmFCR2J5MmhHMVMzb2xhRExTVHRCSU5OQlltdnVXUjlNS09oaHFEcmxrNWN3CkZESkxoNU5y WHRlRVkwOFdBemNMekczcGtyWFBIa0ZlTVF0ZnFrMGpMZEdHdkdDM05DSWtxWXJkTGhpUnZH cHIKdTM4QzI2UkVuNWY0STB2R0UzVmZJWEhlOFRNQ05tUXV0MU50TXVVbXBESXkxYUx4R3p1 cHRVaG5PSk4vL3IrVgpqRFBvaTNMT3lTTllwaHFlL2RNdWJzZlVyNm9oUDQxbUtGODFGdXdJ NGFtcUp0cnFJTDJ5cWF4M2EwcWxmd0N4ClhmdGllcUpjdWVrWCtlQ1BEQ0tyWU1YUjBGWWd3 cEcySVRaVUd0ckVqRVNsRTZEc2N4NzM0SEtkcjVPUklvY0wKVVVLRU9HZWlVNkRHaEdGZGI1 VHd1MFNuK3UxbVVQRE4wTSsrQ2RNdkNsSUU4a2xvNEc5MUVPSW11MVVwYjh4YwpPUFF3eGgx andxU3JVNVF3b05tU1llZ1FTSExwSVV1ckZ6MWlRVWgxdnBQWHpLaW5rV0VxdjRJcUExY2lM K0x5CnlTdUxrcDdNc0pwVlJNYldKQ05XT09TYmFING9EQko1ZEhNR2MzNXg1bW9zQ2s5MFBY a251RkREc1lIZkRvNXMKbWY5bG82WVh4N045Cj0zTGFJCi0tLS0tRU5EIFBHUCBQVUJMSUMg S0VZIEJMT0NLLS0tLS0K Organization: UCLA Computer Science Department Message-ID: <7b0a5600-7dd7-beb2-d14e-11ccff3a164e@cs.ucla.edu> Date: Mon, 21 Sep 2020 12:09:56 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38792-done Cc: 38792-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 (---) Discussion on this worthsmithing issue died down in December so I'm taking the liberty of closing the bug report. We can reopen it or start a new one as necessary. From unknown Sun Jun 15 08:26:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 20 Oct 2020 11:24:14 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator