SHUFFLE(1)

NAME
shuffle - shuffle/randomize command line or stdin

SYNOPSIS
shuffle [ -n,--number N ] [ list ]
shuffle -v,--version

DESCRIPTION
This man page documents version 1.3 of the shuffle program. If it gets any arguments on the command line it will shuffle these and print them, separated by a space, without a newline at the end of the line. If there are no arguments shuffle will read all of stdin, mix up these lines, and spit them back to you.

OPTIONS

-h, --help
    Show a short summary of options.

-n, --number N
    Only show the first N randomly chosen elements.

-s, --source file
    Use file as a source for random data. Typical files would be /dev/random and /dev/urandom.

-v, --version
    Print out the program version to stderr.

DIAGNOSTICS
shuffle knows only one error message: Not enough memory.
    You gave shuffle more input than fits in the available memory.

EXAMPLES

To play your favorite .au files in random order:
    cat `shuffle *.au` > /dev/audio

To add a random tag line to an e-mail message:
    shuffle -n 1 < taglines >> message

To pick a random background every time you run X:
    xv +root -rmode 0 `shuffle -n 1 *-bg.jpg` -quit

BUGS
It doesn't seem quite as random as I would like. I'd swear blind that's a problem in random(3) though.

TO DO
Make it take a file as an argument which it can seek in so it won't need to read the entire file into memory.
Have a user-configurable separator. Best would be to be able to use a regex.
Add an option to seed the random number generator.

AUTHOR
shuffle was written by Tim Newsome <nuisance@cmu.edu>. I mainly wrote it because perl(1) is such a big program to use to get such a little thing done.

SEE ALSO
sort(1)