Man page to PS
- Vous devez vous identifier ou créer un compte pour écrire des commentaires
An easy way to print out UNIX command line man pages.
man -t ls >ls.1.ps
# print to postscript man page of command 'ls'
zathura ls.1.ps
# read the postscript with zathura.
ps2pdf ls.1.ps
# convert to PDF
lpr ls.1.ps
# send to lpr (printer)
--A man page printed on paper:
https://trisquel.info/files/manpage.jpg
--A man page viewed with zathura:
https://trisquel.info/files/zathura2.png
I found out about this while on OBSD. On GNU/Linux, the syntax differs somewhat.
https://paedubucher.ch/articles/2020-09-20-basic-printing-on-openbsd.html
Pièce jointe | Taille |
---|---|
zathura2.png | 51.88 Ko |
manpage.jpg | 689.94 Ko |
You can use pipes:
$ man -t ls | ps2pdf - ls.pdf
$ man -t ls | lpr
You can also substitute every "ls" with "$1" and write each of those lines in executable files, maybe named "man2pdf" and "man2lpr", that you can put in a directory listed in $PATH (so that you do not need to specify their paths to execute them).
- Vous devez vous identifier ou créer un compte pour écrire des commentaires