I am writing several custom man pages, and I would like to include things that can change often, such as the date the man page was created.
For example, one is in the git repo, which I would like to update with the date of the man page whenever the change is made, without having to do it manually.
Is it possible to #include or call shell variables in a *roff file, or possibly a markup file, and then use pandoc to compile the man page with?
I understand that this is a strange question, but I have not seen anything like it.
Note that this is different from simply specifying the man page in $MANPATH to call man .
IE, I want to use something like:
.TH foo 10 "$(git log -n1 | grep Date | tail -c 31)" "$(git branch | grep "*")"
instead of manually changing the date and name of the branch / head each time. Whether it is in markdown and given by pandoc , or something else or just in the roff file, I'm fine too.
linux include shell man
Tropical_Peach
source share