zoukankan      html  css  js  c++  java
  • linux 命令shuf

     1 shuf --help
     2 用法: shuf [选项]... [文件]
     3  或者:  shuf -e [选项]... [参数]...
     4  或者:  shuf -i LO-HI [选项]...
     5 Write a random permutation of the input lines to standard output.
     6 
     7 如果没有指定文件,或者文件为"-",则从标准输入读取。
     8 
     9 必选参数对长短选项同时适用。
    10   -e, --echo                treat each ARG as an input line
    11   -i, --input-range=LO-HI   treat each number LO through HI as an input line
    12   -n, --head-count=COUNT    output at most COUNT lines
    13   -o, --output=FILE         write result to FILE instead of standard output
    14       --random-source=FILE  get random bytes from FILE
    15   -r, --repeat              output lines can be repeated
    16   -z, --zero-terminated     line delimiter is NUL, not newline
    17       --help        显示此帮助信息并退出
    18       --version        显示版本信息并退出
    19 
    20 GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
    21 请向<http://translationproject.org/team/zh_CN.html> 报告shuf 的翻译错误
    22 Full documentation at: <http://www.gnu.org/software/coreutils/shuf>
    23 or available locally via: info '(coreutils) shuf invocation'

    ps:

    shuf train.txt -o test.txt -n 30

    从train.txt文件中随机读取30行文本输出到test.txt

  • 相关阅读:
    Milking Time---poj3616(简单dp)
    elasticsearch-入门(一)
    Spring Cloud Sleuth(十四)
    Spring Cloud Stream(十三)
    Spring Cloud-Bus(十二)
    Spring Cloud-config(十一)
    mac Gitblit安装
    git学习笔记
    java陷阱之spring事物管理导致锁无效
    Spring Cloud-Zuul(十)
  • 原文地址:https://www.cnblogs.com/yangwithtao/p/7047988.html
Copyright © 2011-2022 走看看