💾 Archived View for gemini.susa.net › executable_man_pages.gmi captured on 2023-07-10 at 13:58:38. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
Sometimes you just want to use a binary locally and not do a proper installation, but also want to make the man-page easily accessible.
You can add the following to the top of a man-page, and make it executable, e.g. for the man page source file 'thttpd.8': -
#!/usr/bin/man -l
So your file might look something like this: -
#!/usr/bin/man -l .TH thttpd 8 "29 February 2000" .SH NAME thttpd - tiny/turbo/throttling HTTP server .SH SYNOPSIS .B thttpd .RB [ -C .IR configfile ] .RB [ -p .IR port ] etc. etc. etc. ...
So when I 'chmod a+x thttpd.8' and run it, the man page shows in the man page reader.
It may be a good idea to rename the file (e.g. manpage_thttpd) to differentiate if from a normal man page source file.
Your 'man' command may be located somewhere else, if so you can usually find it with the command 'which man'.