Select random contents from a file Sort sort…


charily Select random contents from a file

notwithstanding Sort

sort -R infile | head -n 3000

Perl

perl -n -e 'print if (rand > 0.1)' infile

Leave a Reply

Your email address will not be published. Required fields are marked *