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

  • 相关阅读:
    java动态代理机制
    Spring的几种注入bean的方式
    java的泛型与反射机制
    java中equals与==的比较
    Java虚拟机JVM简单理解
    java集合类总结
    timersmanager 解析
    rtsp实时流通过rtmp推送到服务端
    udp 视频包网络传输花屏
    GB28181国检推流
  • 原文地址:https://www.cnblogs.com/yangwithtao/p/7047988.html
Copyright © 2011-2022 走看看