On Jan 31, 2007, at 1:19 PM, David Boyes wrote:
/bin/csh cd /usr/man (note, *not* /usr/man/catman!) foreach i (`ls -R *`) ( note backticks -- I'm sure there's a better way, but what did you pay for this one? ) cat $i | troff -man | lpr -Pyourpsprinter echo $i end
Ew, csh. Man pages are also to be found under /usr/share/man on Linux systems. And /usr/local/man and /usr/local/share/man. In sh or bash, the loop would look like: for i in $(ls -R) ; do echo $i cat $i | troff -man | lpr -Pyourpsprinter done (And instead of backticks, $(command). $() nests, which backticks don't.) Adam ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390