Scroll to navigation

SHUF(1) 用户命令 SHUF(1)

名称

shuf - 生成随机排列

概述

shuf [选项]... [文件]
shuf -e [选项]... [参数]...
shuf -i LO-HI [选项]...

描述

把输入行按随机顺序输出到标准输出。

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

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

将每个参数视为输入行
将 LO 到 HI 的每个数字视为输入行
最多输出指定的行数
将结果输出到指定文件而非标准输出
从指定文件获得随机字节
输出行可以重复
以 NUL 作为行的分隔符,而非换行符
显示此帮助信息并退出
显示版本信息并退出

作者

由 Paul Eggert 编写。

报告错误

GNU coreutils 的在线帮助: <https://www.gnu.org/software/coreutils/>
请向 <https://translationproject.org/team/zh_CN.html> 报告翻译错误。

版权

Copyright © 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

参见

完整文档请见: <https://www.gnu.org/software/coreutils/shuf>
或者在本地使用: info '(coreutils) shuf invocation'

本页面中文版由中文 man 手册页计划提供。
中文 man 手册页计划:https://github.com/man-pages-zh/manpages-zh

2020年三月 GNU coreutils 8.32