Viewing man pages in Preview
Today I found this tip on MacOSXHints.com that describes how to see man pages as pdf files. I loved the idea (it's great for searching), but not the implementation (the script creates the pdf files in /tmp, so they're deleted at each restart, and if you call it several times for the same man page, it recreates the same pdf file over and over again).
So I wrote my own version that stores the pdf files in a predefined folder and creates them only once (that is if a pdf file already exists it will just open it).
set pdfManFolder = <myFolderPath>
if !( `filetest -e $pdfManFolder/$1.pdf` ) then
echo Creating $1.pdf
man -t $1 > /tmp/$1.ps
pstopdf /tmp/$1.ps -o $pdfManFolder/$1.pdf