Created
February 5, 2020 03:16
-
-
Save phargogh/bba06909f3641cd2538527e9e8d60065 to your computer and use it in GitHub Desktop.
Convert a manpage to PDF
This file contains hidden or 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
#!/bin/bash | |
# | |
# Convert a program's manpage to PDF. | |
# Assumes that the program has a manpage for it and that ps2pdf14 is installed (part of a latex package). | |
# | |
# Example usage: | |
# $ ./man2pdf bash | |
${1?"Usage: $0 PROGRAMNAME"} | |
man -t $1 | ps2pdf14 - $1_manpage.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment