GNU bug report logs - #38792
man grep

Previous Next

Package: grep;

Reported by: Martin Simons <martin <at> webhuis.nl>

Date: Sun, 29 Dec 2019 15:19:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Martin Simons <martin <at> webhuis.nl>
Subject: bug#38792: closed (Re: bug#38792: man grep)
Date: Mon, 21 Sep 2020 19:11:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#38792: man grep

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 38792 <at> debbugs.gnu.org.

-- 
38792: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38792
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Stephane Chazelas <stephane.chazelas <at> gmail.com>
Cc: 38792-done <at> debbugs.gnu.org
Subject: Re: bug#38792: man grep
Date: Mon, 21 Sep 2020 12:09:56 -0700
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.

[Message part 3 (message/rfc822, inline)]
From: Martin Simons <martin <at> webhuis.nl>
To: bug-grep <at> gnu.org
Subject: man grep
Date: Sun, 29 Dec 2019 15:24:47 +0100
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 <at> 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 <at> 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




This bug report was last modified 4 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.