CUT(1) 用户命令 CUT(1)

名称

cut - 从文件的每一行中移除某些段

概述

cut 选项... [文件列表]...

描述

从每个输入文件中输出指定部分到标准输出。

如果没有指定文件,或者指定文件为“-”,则从标准输入读取。

必选参数对长短选项同时适用。

只选中指定的这些字节
只选中指定的这些字符
使用指定分界符代替制表符作为区域分界
只选中指定的这些域;并打印所有不包含分界符的行,除非同时指定了 -s 选项
(被忽略的选项)
补全选中的字节、字符或域
do not print lines not containing delimiters
use STRING as the output delimiter the default is to use the input delimiter
以 NUL 空字符而非换行符作为行分隔符
显示此帮助信息并退出
显示版本信息并退出

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 个字节、字符或字段(从 1 开始数)
N-
从第 N 个字符、字节或字段,到行末
N-M
从第 N 个到第 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

2022年9月 GNU coreutils 9.1