rl - Randomize Lines

rl reads lines from a 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.

I wrote rl in my spare time mainly to be able to select a random audio file
to play when my toast is done (script in combination with find and sleep).
Another reason was to familiarize myself with autoconf and friends.

The most recent version of this page can be found at
http://tiefighter.et.tudelft.nl/~arthur/rl/.

Warning: rl is alpha software and has not been thoroughly tested yet. The
command line options and default behavior may even change between releases.
Download


COPYRIGHT NOTICE
----------------

Copyright (C) 2001, 2002, 2003 Arthur de Jong

rl is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA  02111-1307  USA


INSTALLATION INSTRUCTIONS
-------------------------

rl should compile fine on most Unix-like operating systems. It is written to
be as portable as possible.

rl is developed on Debian GNU/Linux  2.2 and tested on Solaris 7 (regularly),
OpenBSD 2.7 (sometimes) and HP-UX 10 (hardly ever).

rl uses a configure script to guess build parameters for your system.
Configuration, compilation and installation would be as simple as one, two,
three:

  % ./configure   (use --help for options)
  % make  (compile)
  % make install  (install)

For more details read the INSTALL file.


CVS access
----------

The current development version of rl is also available through anonymous cvs
pserver (using the cvsd security wrapper). To get the files from cvs you
should do:

  % cvs -d :pserver:anonymous@tiefighter.et.tudelft.nl:/arthur login
  (just enter an empty password)
  % cvs -d :pserver:anonymous@tiefighter.et.tudelft.nl:/arthur co rl

This should check out all files from CVS. Some files need to be generated
however. From the checked out rl directory:

  % ./autogen.sh

From there the standard configure/make stuff described above should work.


PLANS / TODO
------------

rl is still in development and there are more features to implement. The
development is currently based on the "it works for me" principle. For a list
of items that should still be done see the TODO file.

If you want any features added to rl or you have comments or questions you
can email me at arthur@tiefighter.et.tudelft.nl. Patches for bug fixes and
feature extensions are appreciated.


FUN AND USEFULL THINGS TO DO WITH RL
------------------------------------

  *  sleep 240 ; play `find /sounds -name '*.au' -print | rl --count=1`
     Play a random sound after 4 minutes (perfect for toast).
  *  renice +5 -u `who | cut '-d ' -f 1 | sort -u | rl --count=1`
     Renice all the processes of a random logged-in user.
  *  kill -9 `ps -A | cut '-d ' -f 2 | rl --count=1`
     Kill a random process on your computer. Do this as root and see how long
     your system keeps working. Increase the --count for extra effect. (you
     might need to change the ps parameters depending on your system)


LINKS
-----

You might want to have a look at the rl Freshmeat page:
http://freshmeat.net/projects/rl/
Other similar programs? Other links? Any comment? Email me at:
arthur@tiefighter.et.tudelft.nl
