Skip to content

Comment on Life in Text Modeparent

Comments

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).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.