Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/books/sed_awk_grep/2_grep_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tags:

# `grep` command

The `grep` command filters the content of single or multiple files. Some variants of this command tool exist, such as `egrep (grep -E)` and `fgrep (grep -f)`. For information not covered, see [the `grep` manual](https://www.gnu.org/software/grep/manual/ "grep manual").
The `grep` command filters the content of single or multiple files. Some variants of this command tool exist, such as `egrep (grep -E)` and `fgrep (grep -f)`. For information not covered, see [the grep manual page(s)](https://www.gnu.org/software/grep/manual/).

The usage of the `grep` command is:

Expand All @@ -25,7 +25,7 @@ The options are mainly divided into four parts:
* content line control
* directory or file control

match control
match control:

| options | description |
|------------------------|---------------------------------------------------------|
Expand Down Expand Up @@ -66,9 +66,9 @@ directory or file control:
| options | description |
| :--- | :--- |
| --include=FILE_PATTERN | Searches only files that match FILE_PATTERN. Wildcard characters for file names support *, ?, [], [^], [-], {..}, {,} |
| --exclude=FILE_PATTERN | Skips files and directories matching FILE_PATTERN. Wildcard characters for file names support *, ?, [], [^], [-], {..}, {,} |
| --exclude=FILE_PATTERN | Skips files matching FILE_PATTERN. Wildcard characters for file names support *, ?, [], [^], [-], {..}, {,} |
| --exclude-dir=PATTERN | Excludes the specified directory name. Directory name support *, ?, [], [^], [-], {..}, {,} |
| --exclude-from=FILE | Excludes the specified directory from the file content. |
| --exclude-from=FILE | Excludes the specified file from the file content |

## Examples of usage

Expand Down
Loading