[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38792: closed (man grep)

From: GNU bug Tracking System
Subject: bug#38792: closed (man grep)
Date: Mon, 21 Sep 2020 19:11:02 +0000

Your message dated Mon, 21 Sep 2020 12:09:56 -0700
with message-id <7b0a5600-7dd7-beb2-d14e-11ccff3a164e@cs.ucla.edu>
and subject line Re: bug#38792: man grep
has caused the debbugs.gnu.org bug report #38792,
regarding man grep
to be marked as done.

(If you believe you have received this mail in error, please contact

38792: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38792
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: man grep Date: Sun, 29 Dec 2019 15:24:47 +0100 User-agent: Roundcube Webmail/1.1.5
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:
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: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,


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,

LinkedIn: https://www.linkedin.com/in/martinsimons1/
GitHub:   https://github.com/Webhuis/CFEngine-Roadshow/tree/master/
Twitter:  https://twitter.com/webhuis @Webhuis #TheCFEngineRoadshow

--- End Message ---
--- Begin Message --- Subject: Re: bug#38792: man grep 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 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.

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]