Last active
December 17, 2018 09:31
-
-
Save crispgm/c9c2dd384b44f243b73e97248cc8b1a0 to your computer and use it in GitHub Desktop.
Random sample from a file with awk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk 'BEGIN {srand()} !/^$/ { if (rand() <= .01) print $0}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment