返回列表 发帖
本帖最后由 pcl_test 于 2016-9-6 23:42 编辑

第三方
  1. #*&cls&dir /a-d/b *.txt|find /i /v "all.txt"|gawk -f "%~f0"&pause&exit
  2. BEGIN{
  3.     srand();
  4.     file="all.txt";
  5.     n=10;
  6.     while(getline<file>0){
  7.         m++;a[m]=$0;
  8.     }
  9.     while(getline>0){
  10.         s="\n";
  11.         for(i=1;i<=n;i++){
  12.             r=int(rand()*m+1);
  13.             s=s""a[r]"\n"
  14.         }
  15.         printf s>>$0;  
  16.     }
  17. }
复制代码

TOP

返回列表