From 12626e7c1d52ae3ed8cfe392f50566d4ab0be27f Mon Sep 17 00:00:00 2001 From: kneutron <50146127+kneutron@users.noreply.github.com> Date: Mon, 3 Apr 2023 09:25:54 -0500 Subject: [PATCH] Add files via upload --- ...rt-man-pages-to-postscript-for-printing.sh | 22 +++++++++++++++++++ manTtoPS.sh | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 convert-man-pages-to-postscript-for-printing.sh create mode 100644 manTtoPS.sh diff --git a/convert-man-pages-to-postscript-for-printing.sh b/convert-man-pages-to-postscript-for-printing.sh new file mode 100644 index 0000000..7a1cbdf --- /dev/null +++ b/convert-man-pages-to-postscript-for-printing.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# REF: https://distrowatch.com/weekly.php?issue=current +# REF: https://stackoverflow.com/questions/28357997/running-programs-in-parallel-using-xargs/28358088#28358088 + +cd +mkdir -pv Printable-Manual-Pages ; cd Printable-Manual-Pages +pwd + +#time find /usr/share/man/man? -type f -print0 |gxargs -0 -t -I % -n 1 -P $(nproc) manTtoPS.sh % # "man -t "%" > $(basename "%").ps" + +time find /opt/local/man/man? -type f -print0 |gxargs -0 -t -I % -n 1 -P $(nproc) manTtoPS.sh % # "man -t "%" > $(basename "%").ps" + +du -s -h +date + +exit; + +for page in $(find /usr/share/man/man? -type f); do + echo "Processing $page" + man -t "$page" > $(basename "$page").ps +done diff --git a/manTtoPS.sh b/manTtoPS.sh new file mode 100644 index 0000000..24891e7 --- /dev/null +++ b/manTtoPS.sh @@ -0,0 +1,2 @@ +#!/bin/bash +man -t $1 > $(basename $1).ps \ No newline at end of file