Subject: bug#37604: man page description of -i confused someone

From: Tom Limoncelli <[email-masked]>
Date: Thu, 3 Oct 2019 09:08:59 -0400

There's an interesting question about grep posted on StackOverflow.com:

       https://stackoverflow.com/questions/45717127

The user was confused why "-i" didn't apply to the NAMES of the files on
the command line.  Obviously this is a misunderstanding of the separation
of duties between the shell and the commands (shell expands wildcards, not
the command).  The top ranked answer for the question gently explained the
difference.

That said, I do take pity on the person, who may have been an early
beginner or possibly not a native English speaker.  The man page says:

       *-i*, *--ignore-case*

              Ignore case distinctions in both the PATTERN and the input

              files.

Taking off my developer hat and putting on my writer/author hat, I have to
agree that the man page could be phrased better.  I think the person got
caught up by seeing the word "files" instead of "contents". (I could also
make the case that the fact that stdin isn't really a file means the
sentence is inaccurate.)

My suggestion is to change the description to be:

   Ignore case distinctions in both the PATTERN and the contents being
searched.

even better would be to break it into multiple sentences. This would make
it perfectly clear:

   Ignore case during the search. Case is ignored in both the input
contents PATTERN and the contents being searched.

Tom

-- 
Email: [email-masked]    Work: [email-masked]
Blog:  http://EverythingSysadmin.com/