我想用*roff格式的原始手册页转换成pandoc格式,将其转换为PDF格式,并在文档查看器中显示它,例如,
$ my_script vim
...若要有一个新窗口显示格式化的手册页,请执行以下操作。
我在编写my_script时没有其他问题,大部分都是这样的
zcat /???/vim.?.gz | pandoc -f man -t pdf | okular -但我不知道如何找到vim手册页的*roff源的确切位置,除非它位于$MANPATH的子目录中。
我知道有些命令有多个手册页,所以我想知道如何检索手册页源的第一个位置。
发布于 2022-03-29 15:23:33
通过阅读man man,您将看到man‘S -w选项:
-w, --where, --path, --location
Don't actually display the manual page, but do print the
location of the source nroff file that would be formatted.
If the -a option is also used, then print the locations of
all source files that match the search criteria.https://unix.stackexchange.com/questions/697222
复制相似问题