Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grep: add Traditional Chinese translation #15576

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
24 changes: 24 additions & 0 deletions pages.zh_TW/common/grep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# grep

> 使用正則表達式在文件中查找字符串。
> 更多資訊:<https://www.gnu.org/software/grep/manual/grep.html>.

- 在檔案中尋找字符:

`grep "{{字符串}}" {{檔案/完整/路徑}}`

- 搜索確切的字符串(禁用正則表達式):

`grep {{-F|--fixed-strings}} "{{精確字符串}}" {{檔案/完整/路徑}}`

- 在目錄中遞歸搜索模式,顯示匹配行的行號:

`grep {{-r|--recursive}} {{-n|--line-number}} "{{字符串}}" {{檔案/完整/路徑}}`

- 使用擴展正則表達式(支持 `?`, `+`, `{}`, `()`, 和 `|`),並啟用不區分大小寫的模式:

`grep {{-E|--extended-regexp}} {{-i|--ignore-case}} "{{字符串}}" {{檔案/完整/路徑}}`

- 在標準輸入中搜索不匹配模式的行:

`cat {{檔案/完整/路徑}} | grep {{-v|--invert-match}} "{{字符串}}"`
Loading