man
Create a PDF file
_$: man -t ls > ls.ps && ps2pdf ls.ps ls.pdf
Example: Generate a PDF file with all git man pages to read at lunchtime and be the coolest guy in the restaurant.
_$: for i in /usr/share/man/man1/git*
do
filename=$(basename $i .1.gz)
man -t ${filename} > /tmp/git/${filename}.ps
ps2pdf /tmp/git/${filename}.ps /tmp/git/${filename}.pdf
rm /tmp/git/${filename}.ps
done
In one file:
_$: gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=the-git-man.pdf /tmp/git/*.pdf