grep-devel
[Top][All Lists]
Advanced

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

manpage: Use -H instead of adding /dev/null to searched files


From: Mateusz Okulus
Subject: manpage: Use -H instead of adding /dev/null to searched files
Date: Sun, 13 Jun 2021 20:48:52 +0200

grep manpage example uses an additional /dev/null file to make grep
print out the name of the file that matches in case '*g*.h' glob matches
only one file. I believe the -H option was added exactly for this use
case, that is to make grep always print file names, even if only one was
given. Because of that I think the example should be changed to use the -H
flag to something like grep -Hn -- 'f.*\.c$' *g*.h. The description
should also be changed appropriately.

I haven't filed any copyright assignments so unfortunately I'll abstain
from providing a patch, but this is only a small documentation change.

Regards,
mmokulus

Attachment: signature.asc
Description: PGP signature


reply via email to

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