The story: A few obfus ago I had a bunch of lines that I wanted to randomize to keep the obfu from being deconstructed a little too quickly. So, I came up with a short script that I have since shortened to a one-liner:
123456789_123456789_123456789_123456789_123456789_123456789_1 perl -e'@l=<>;while(@l){$i=rand@l;print$l[$i];splice@l,$i,1}'
Scored in accordance with PGA Golf Rules, it hits the clubhouse at 61 chars. However, I'm sure there's probably much shorter ways out there that my feeble, cheese-filled mind isn't thinking of, and I figured some of you might get a little enjoyment out of this, so here we go...
Sample input:
This is some sample input that CheeseLord put here for you.
Sample output:
input that for you. put here CheeseLord is some sample This
Final Note: The space between -e and ' has proven optional everywhere I've tried it -- but if it turns out not to be somewhere, I'll gladly take the one-stroke penalty.
His Royal Cheeziness
In reply to (GOLF) Randomizing lines by CheeseLord
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |