Miscellaneous utilities
Here are some utilities that I've written out of need. Several of them depend on each other or other common software; dependencies are noted below. Brief descriptions follow; precise documentation, where it exists, is in the programs themselves.
See the individual programs for their licenses; most of them are GPLed, while a couple of trivial ones are placed in the public domain.
The Lua scripts need the stdlib Lua libraries. In general, a full set of POSIX commands is assumed; there are likely to be unwitting dependencies on GNU extensions.
repeat (sh)
Repeat a command a certain number of times.
retcode (sh)
Run a command and print its return code.
rep (Perl)
Perform a regex search and replace on the given files.
prepend (sh)
Prepends standard input to the given files.
softwrap (Lua) and hardwrap (sh)
Soft and hard wrap text. hardwrap just uses fold.
sig (Perl)
A signature-with-random-tagline generator: it appends a random line from ~/.taglines to ~/.signature, formats the result nicely and prints it on standard output.
lp2 (Perl)
Print files two-sided on a one sided printer by printing the even and then the odd pages. It's set up to work sensibly on my printer (straight paper path, pages come out face down). It works with any file type that CUPS can print.
hb (bash)
Reports the size of files on the PATH.
findcore (sh)
Find core dumps (finds core dumps with a PID suffix, and vgcore files generated by Valgrind).
thumbify (Perl)
Needs Image::ExifTool
Add EXIF thumbnails to images. In practice, this seems to mean JPEGs and PNGs.