Skip to content

Instantly share code, notes, and snippets.

@rkempter
Created March 5, 2015 15:48
Show Gist options
  • Save rkempter/7521b219640777267a4e to your computer and use it in GitHub Desktop.
Save rkempter/7521b219640777267a4e to your computer and use it in GitHub Desktop.
Sampling from a file through shell
awk 'BEGIN {srand()} !/^$/ { if (rand() <= .5) print $0}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment