0. Internet 1. Text 2. Graphics 3. System 4. File 5. Misc 6. Palm 7. OS X |
Randomize lines with custom delimiter # Arthur de Jong's rl (randomize lines) "reads lines from an input file or stdin, randomizes the lines and outputs a specified number of lines. It does this with only a single pass over the input while trying to use as little memory as possible." It came in handy when I wanted to randomize a collection of quotes which looked like this: %Here's how I randomly reordered them with rl, specifying "%" as the delimiter instead of the default newline: $ rl -d% quotes.txt > randomized_quotes.txtThe latest version is 0.2.7. Install via ./configure && make && make install, or OS X users can grab this binary I compiled under 10.6. (tags: unix, randomize, lines, text, reorder, rearrange) /nix | Apr 29, 2010 |
Categories
Blosxom Archive
2012: 5 4 3 2 1
2011: 12 11 10 9 8 7 6 5 4 3 2 1 2010: 12 11 10 9 8 7 6 5 4 3 2 1 2009: 12 11 10 9 8 7 6 5 4 3 2 1 2008: 12 11 10 9 8 7 6 5 4 3 2 1 2007: 12 11 10 9 8 7 6 5 4 3 2 1 2006: 12 11 10 9 8 7 6 5 4 3 2 1 2005: 12 11 10 Blogger Archive
Ezine Archive
|