sourCEntral - mobile manpages

pdf

CUT

名稱

cut - 從檔案的每一行中移除某些段

概述

cut 選項... [檔案列表]...

描述

從每個輸入檔案中輸出指定部分到標準輸出。

如果沒有指定檔案,或者指定檔案為“-”,則從標準輸入讀取。

必選引數對長短選項同時適用。
-b
, --bytes=列表

只選中指定的這些位元組

-c, --characters=列表

只選中指定的這些字元

-d, --delimiter=分界符

使用指定分界符代替製表符作為區域分界

-f, --fields=列表

只選中指定的這些域;並列印所有不包含分界符的行,除非同時指定了 -s 選項

-n

(被忽略的選項)

--complement

補全選中的位元組、字元或域

-s, --only-delimited

do not print lines not containing delimiters

--output-delimiter=STRING

use STRING as the output delimiter the default is to use the input delimiter

-z, --zero-terminated

以 NUL 空字元而非換行符作為行分隔符

--help

顯示此幫助資訊並退出

--version

顯示版本資訊並退出

Use one, and only one of -b, -c or -f. Each LIST is made up of one range, or many ranges separated by commas. Selected input is written in the same order that it is read, and is written exactly once. Each range is one of:

N

第 N 個位元組、字元或欄位(從 1 開始數)

N-

從第 N 個字元、位元組或欄位,到行末

N-M

從第 N 個到第 M 個(包括第 M 個)字元、位元組或欄位

-M

從第 1 個到第 M 個(包括第 M 個)字元、位元組或欄位

作者

由 David M. Ihnat、David MacKenzie 和 Jim Meyering 編寫。

報告錯誤

GNU coreutils 的線上幫助: <https://www.gnu.org/software/coreutils/>
請向 <https://translationproject.org/team/zh_CN.html> 報告翻譯錯誤。

版權

Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
本軟體是自由軟體:您可以自由修改和重新發布它。在法律允許的範圍內,不提供任何保證。

參見

完整文件請見: <https://www.gnu.org/software/coreutils/cut>
或者在本地使用: info '(coreutils) cut invocation'

本頁面中文版由中文 man 手冊頁計劃提供。
中文 man 手冊頁計劃:https://github.com/man-pages-zh/manpages-zh

pdf