Update grep.md (#327)

This commit is contained in:
logicwang 2022-01-13 23:44:45 +08:00 committed by GitHub
parent c9701bc8b4
commit 004523119f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -119,6 +119,12 @@ line.
grep -c "text" file_name
```
搜索命令行历史记录中 输入过 `git` 命令的记录:
```shell
history | grep git
```
输出包含匹配字符串的行数 **-n** 选项:
```shell