原来 man2pdf 还可以更简单的, man 有个选项 -t 可以直接把 man page 转换成 PostScript 格式, 然后直接调 ps2pdf 就可以了:
# Linux
$ man -t bash | ps2pdf - > bash.pdf
# Mac OS X
$ man -t bash | pstopdf -i -o bash.pdf
可怜俺辛辛苦苦写的 man2pdf.sh, 估计以后没有人再用了 :(
Sometimes I wonder about my life. I lead a small life. Well, valuable but small. And sometimes I wonder, do I do it because I like it, or because I haven't been brave? So much of what I see reminds me of something I read in a book, when shouldn't it be the other way around? I don't really want an answer. I just want to send this cosmic question out into the void. So good night, dear void.
原来 man2pdf 还可以更简单的, man 有个选项 -t 可以直接把 man page 转换成 PostScript 格式, 然后直接调 ps2pdf 就可以了:
Posted by
Display Name
-
9:18 AM
Labels: Apple, Shell/Scripting
No comments:
Post a Comment