shell-快速抽样

  有时我们需要对文件进行抽样,这时候只需要一个shell命令就可以抽取固定行数的样本:shuf

  shuf -n $m $file

  参数有2:

    -n: 抽样行数

    -r: 是否重复

原文地址:https://www.cnblogs.com/estragon/p/10642444.html