Cols.c takes standard input or files and arranges the lines in the input into nice columns or rows. It is based on GNU ls and was written because I wanted to hack some GNU command line tools, but it turns out to be pretty useful when you are writing scripts and you want to dump a lot of information in compact format. It is much better than the various hacks you will find to do the same thing using Awk or the shell.
This code compiles on Cygwin, OS X, and Montevista Linux, but you may have to fiddle with it to make it compile on your system. There is a makefile in the tarball, but a simple "gcc cols.c -o cols" should also work.