2021-10-26 22:12:12 +02:00
|
|
|
## Name
|
|
|
|
|
|
|
|
|
|
grep
|
|
|
|
|
|
|
|
|
|
## Synopsis
|
|
|
|
|
|
|
|
|
|
```sh
|
2023-03-31 12:55:20 -07:00
|
|
|
$ grep [--recursive] [--extended-regexp] [--fixed-strings] [--regexp Pattern] [--file File] [-i] [--line-numbers] [--invert-match] [--quiet] [--no-messages] [--binary-mode ] [--text] [-I] [--color WHEN] [--count] [file...]
|
2021-10-26 22:12:12 +02:00
|
|
|
```
|
|
|
|
|
|
2023-03-30 23:06:56 +01:00
|
|
|
## Options
|
2021-10-26 22:12:12 +02:00
|
|
|
|
|
|
|
|
* `-r`, `--recursive`: Recursively scan files
|
|
|
|
|
* `-E`, `--extended-regexp`: Extended regular expressions
|
2022-10-25 22:11:34 -06:00
|
|
|
* `-F`, `--fixed-strings`: Treat pattern as a string, not a regexp
|
2021-10-26 22:12:12 +02:00
|
|
|
* `-e Pattern`, `--regexp Pattern`: Pattern
|
2023-03-31 12:55:20 -07:00
|
|
|
* `-f File`, `--file File`: Read patterns from a file
|
2021-10-26 22:12:12 +02:00
|
|
|
* `-i`: Make matches case-insensitive
|
2021-11-05 00:35:31 +01:00
|
|
|
* `-n`, `--line-numbers`: Output line-numbers
|
2021-10-26 22:12:12 +02:00
|
|
|
* `-v`, `--invert-match`: Select non-matching lines
|
|
|
|
|
* `-q`, `--quiet`: Do not write anything to standard output
|
|
|
|
|
* `-s`, `--no-messages`: Suppress error messages for nonexistent or unreadable files
|
|
|
|
|
* `--binary-mode`: Action to take for binary files ([binary], text, skip)
|
|
|
|
|
* `-a`, `--text`: Treat binary files as text (same as --binary-mode text)
|
|
|
|
|
* `-I`: Ignore binary files (same as --binary-mode skip)
|
|
|
|
|
* `--color WHEN`: When to use colored output for the matching text ([auto], never, always)
|
2021-11-12 21:56:02 +00:00
|
|
|
* `-c`, `--count`: Output line count instead of line contents
|
2021-10-26 22:12:12 +02:00
|
|
|
|
2023-03-30 23:06:56 +01:00
|
|
|
## Arguments
|
2021-10-26 22:12:12 +02:00
|
|
|
|
|
|
|
|
* `file`: File(s) to process
|
|
|
|
|
|
|
|
|
|
<!-- Auto-generated through ArgsParser -->
|