Hacker News new | past | comments | ask | show | jobs | submit login

Just a nit, but what version of random works like that? BSD random(6) "reads lines from the standard input and copies them to the standard output with a probability of 1/denominator. The default value for denominator is 2."

I ended up writing my own (overengineered) program, but I'd be interested in knowing what you use.




I use "foo | random -f -" but I omitted that for the sake of brevity, hoping it would be taken as a generic name for a script/program that shuffled lines for illustrative purposes. I personally use textproc/rl for shuffling lines, as it's faster than stock random(6).




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: