本帖最后由 pcl_test 于 2016-9-6 23:42 编辑
第三方- #*&cls&dir /a-d/b *.txt|find /i /v "all.txt"|gawk -f "%~f0"&pause&exit
- BEGIN{
- srand();
- file="all.txt";
- n=10;
- while(getline<file>0){
- m++;a[m]=$0;
- }
- while(getline>0){
- s="\n";
- for(i=1;i<=n;i++){
- r=int(rand()*m+1);
- s=s""a[r]"\n"
- }
- printf s>>$0;
- }
- }
复制代码
|