rl is a command-line tool that 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. WWW: http://tiefighter.et.tudelft.nl/~arthur/rl/