Wednesday, March 24, 2021

Randomly sample files

From https://unix.stackexchange.com/questions/108581/how-to-randomly-sample-a-subset-of-a-file 

perl -ne 'print if (rand() < .01)' huge_file.csv > sample.csv

No comments: