On 10/6/21 3:57 PM, Alejandro Colomar (man-pages) wrote:
function pdfman()
{
if (($# == 0)); then
>&2 echo "Usage: ${FUNCNAME[0]} [man options] [[section] page
...] ...";
Oops! Since it only supports a single page, it should be:
>&2 echo "Usage: ${FUNCNAME[0]} [man options] [section] page";
return ${EX_USAGE};
fi;
local tmp="$(mktemp -t "${1##*/}.XXXXXX")";
man -Tps $@ \
| ps2pdf - - \
> ${tmp};
xdg-open ${tmp};
}
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/