Xref: utzoo comp.unix.sysv386:7388 comp.unix.xenix.sco:2345 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!think.com!zaphod.mps.ohio-state.edu!caen!umich!sharkey!rjf001!mudos!mju From: mju@mudos.ann-arbor.mi.us (Marc Unangst) Newsgroups: comp.unix.sysv386,comp.unix.xenix.sco Subject: Re: Less misbehaves when used for "man" pager... Message-ID: Date: 26 Apr 91 08:02:11 GMT References: <30370@cs.yale.edu> Organization: The Programmer's Pit Stop, +1 313 665 2832 Lines: 48 fields-doug@CS.YALE.EDU (Doug Fields) writes: > of pg, and you try to read a un-formatted man page (I installed the TPS > from Xenix on my Unix), less will spew out a ton of warnings about things > the terminal can't do, such as scroll backwards, etc. This has happened from > both SCO products, 3.2.2 Unix and 2.3.3 Xenix. Is the TERM environment variab > somehow misplaced or something? Sort of. If you look closely at how man does things, you'll notice that when it has to format a man page, it hands all the commands it uses "TERM=dumb" and then filters the output through "col -b". This is, I suppose, to keep the output suitable for display on a video terminal. Unfortunately, this means that "less" thinks your terminal is dumb, which causes it to complain. (To supress this complaint, use "less -d", assuming your version of less supports it.) Unfortunately, it also means that if man formats a man page, the resultant formatted copy will not have underlining or boldfacing in it, so "less" won't display them. (Neither will "more", for that matter.) The solution, under Xenix, is to do something like this from /usr/man: for i in man.* do cd $i c=`echo $i | sed 's/man/cat/'` for j in * do if [ ! -f ../$c/$j ] then nroff -man $j >../$c/$j pack ../$c/$j fi done cd .. done This will step through all of your man.* directories, format any man pages that haven't yet been formatted, and then run "pack" on them so they take up less space. (You really should use "compress" instead, but SCO man(1) doesn't understand .Z by default, and also doesn't include compress with Xenix. If you have Xenix, where man(1) is a shell script, you can add .Z support, and use compress if you have it. If you have Unix, you're SOL unless you want to rip out SCO's version of man and replace it with something of your own invention.) If you want to format all the man pages, not just the ones that haven't yet been formatted, simply take out the if statement that checks for the formatted man page. -- Marc Unangst | mju@mudos.ann-arbor.mi.us | "Bus error: passengers dumped" ...!hela!mudos!mju |