Quantcast
Channel: Planet Ubuntu
Viewing all articles
Browse latest Browse all 17727

Aron Xu: Convert man page to PDF

$
0
0

It’s fairly easy:
$ man -t bash | ps2pdf - bash.pdf

“man -t” uses groff -mandoc to format the manual page to stdout.

“ps2pdf – bash.pdf” means the input is from stdin and output to bash.pdf.

We use a simple pipe to join the stdout of “man” and stdin of “ps2pdf”.

That’s it!


Viewing all articles
Browse latest Browse all 17727

Trending Articles