- Add more EXAMPLES covering flags: -A, -B, -c, -f, -i, -H, -l, -q, -R, -w
- While here, change existing wording to use the imperative (remove "To find")
- Reword first example to be consistent with how grep(1) understand words (-w)
Details
Details
- Reviewers
bcr - Group Reviewers
manpages - Commits
- rS367850: grep(1): Add more EXAMPLES
- mandoc -Tlint clean
- igor clean
- aspell happy
- man ./grep.1 renders the page properly
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
The examples look good. Maybe another one to show how to do a case-sensitive search (i.e. just uppercase)?
usr.bin/grep/grep.1 | ||
---|---|---|
459 ↗ | (On Diff #79698) | I'd just use "word" or "pattern" here instead of text to be consistent. |
Comment Actions
Except for the example with -i the rest of them are case sensitive. The example reading from the standard input uses the uppercase BSD in case sensitive mode. Do you mean a separate example?
Thanks!
Comment Actions
Right, I was thinking of a separate example at the beginning. Something along the lines of "Search for exactly this pattern ignoring case." You could combine this with count, so that for an input like
BSD
bsd
you'd get different counts for -i or without it.
Comment Actions
- Add new example with upper case and redo the previous one to show the difference when using -i (suggested by bcr@)
- Remove -i from two examples since that flag is covered earlier
- s/showing/show in the descritption of an example