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

cut: add chinese translation #15572

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions pages.zh/common/cut.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# cut

> 从标准输入或文件中剪切字段。
> 更多信息:<https://www.gnu.org/software/coreutils/manual/html_node/cut-invocation.html>.

- 打印每行的特定字符/或属性范围:

`{{命令}} | cut -{{characters|fields}} {{1|1,10|1-10|1-|-10}}`

- 打印每行由指定分隔符分割的属性范围:

`{{命令}} | cut --delimiter "{{分隔符}}" --fields {{1|1,10|1-10|1-|-10}}`

- 打印文件每行的字符范围:

`cut --characters {{1|1,10|1-10|1-|-10}} {{路径/到/文件}}`

- 打印以 `NUL` 结尾的行的特定字段(例如 `find . -print0`)而不是换行符:

`{{命令}} | cut --zero-terminated --fields {{1}}`
2 changes: 1 addition & 1 deletion pages/common/cut.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

- Print a [f]ield range of each line with a specific [d]elimiter:

`{{command}} | cut --delimiter "{{,}}" --fields {{1}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the original example is better. The , is more intuitive in letting people know they can put whatever delimiter here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation of each command should be consistent, for example, paste is delimiter, and the documentation of other languages ​​also uses delimiter

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, fine.

`{{command}} | cut --delimiter "{{delimiter}}" --fields {{1|1,10|1-10|1-|-10}}`

- Print a [c]haracter range of each line of the specific file:

Expand Down
Loading