diff options
Diffstat (limited to 'src/cli/grep.md')
-rw-r--r-- | src/cli/grep.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cli/grep.md b/src/cli/grep.md new file mode 100644 index 0000000..a2001b9 --- /dev/null +++ b/src/cli/grep.md @@ -0,0 +1,20 @@ +# grep(1) + +``` +sort [opts] [pattern] [files] + -e <pattern> pattern to search for (can be supplied multiple times) + -i ignore case in patterns + -v invert match + + -n add line numbers to matched lines + -H add file name to matched lines + + -r recursively read all files + -I skip binary files + --include <glob> search only files matching glob + --exclude <glob> skip searching files matching glob + + -c count occurrence of matched patterns + -l list only file name which contain the pattern +``` +> `<glob>` patterns may need to be quoted or escaped if the shell also does glob expansion. |