Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    "It ignores case in the file (contents) but also in the pattern", this suggests (although it doesn't necessarily say it), that it is possible to ignore case in the pattern, but not in the contents. I'd like to understand how this would work (ignoring pattern, but not contents -- or the other way around). Commented Apr 17, 2019 at 23:41
  • 2
    In less, for example, there's a -i mode in which matching is case-insensitive if you only use lowercase letters in the pattern, but if there are any uppercase letters in the pattern, the whole thing is case-sensitive. That's like (sometimes) ignoring case in the contents but not the pattern. Commented Apr 17, 2019 at 23:48
  • less is an interactive program quite unlike grep, not sure how it relates at all. interactive programs make usability choices, like nano where you can change case-sensitivity by hotkey. As for the manpage I think the old text actually explained it better, the new one does not make clear the pattern meaning itself changes too (even if [A-z] example is a bit constructed, the match result is completely different, so it should be in the manpage, but isn't anymore). Commented Apr 18, 2019 at 10:01