<?php
ini_set("memory_limit","1800M");
$count = 0;
for ($i = 10000; $i <= 300000000; $i++) {
$count++;
$str[] = $i;
if (($i % 100) == 0) {
shuffle($str);
$a = implode("\n", $str);
$file = mt_rand(0, 10000);
file_put_contents('data/'.$file.'.txt', $a."\n", FILE_APPEND);
$str = array();
}
}
for file in `ls *.txt`;do shuf $file > $file-shuf;done
cat data/*-shuf > shuf-all.txt
标签:none