shell-快速抽样

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

  shuf -n $m $file

 

  参数有2:

    -n: 抽样行数

    -r: 是否重复

posted @ 2019-04-02 14:28  爱斯特拉冈  阅读(559)  评论(0编辑  收藏  举报