Created
April 18, 2014 07:34
-
-
Save zmwangx/11029552 to your computer and use it in GitHub Desktop.
Convert man pages to PDF or HTML.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convert a manpage to PDF, and open in Preview | |
# (in fact, man -t generates PostScript, which is converted to PDF by Preview) | |
function pman { | |
man -t "${1}" | open -f -a /Applications/Preview.app | |
} | |
# convert a manpage to HTML and open in the browser | |
function bman { | |
tmpfile="/tmp/bman.$RANDOM.html" | |
man "${1}" | man2html > $tmpfile | |
open $tmpfile | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment