Hacker News new | ask | show | jobs
by taltman1 4117 days ago
Reservoir sampling in a few lines of awk:

https://github.com/taltman/scripts/blob/master/EDA/samp

It's shorter than this ruby implementation, and includes copious documentation, file handling, and corner-case support.