Open tkhunkhe opened 7 years ago
awk 'BEGIN {srand()} !/^$/ { if (rand() <= .01 || FNR==1) print $0}'
cat data.txt | wc -l = 10884540 cat us.data.tsv | wc -l = 8104022 8104022 * 1% = 81040
cat data.txt | wc -l
cat us.data.tsv | wc -l
awk 'BEGIN {srand()} !/^$/ { if (rand() <= .01 || FNR==1) print $0}'