Skip to content

Instantly share code, notes, and snippets.

# LINKS:
* http://www.math.harvard.edu/computing/perl/oneliners.txt
* https://gist.github.com/mischapeters/1e8eef09a0aafd4f24f0
# random line from file
perl -e 'srand;' -e 'rand($.) < 1 && ($it = $_) while <>;' -e 'print $it' file.csv
#NOTE: the above is easier with the following bash command
shuf -n 1 file.csv