分割数据

#!/bin/bash
#soyo1.sh
#FILE=$1      
NUM=$1      
#cat $1 | sed  -n "1,${NUM}p"
for file in *.txt;do
          echo $file
done

for file in *.txt;do
      
      {
       cat $file | sed  -n "1,${NUM}p">>分割${NUM}流.txt
      # cat $file >>all.txt
     }
done

./soyo.sh 5000 (5000是希望得到的流数)
原文地址:https://www.cnblogs.com/soyo/p/7349854.html