This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: documentation for windows


Jonadab,

Well, there's more to the manual than section 1, but that would be 
accommodated with this variation:

grep /usr/man/man*/*

Then there's the fact that you'd get all the lines from all the man page 
files, when what you want is to know the names of the commands on which to 
run "man." So:

grep -l /usr/man/man*/*

But the real problem is that you'll probably get too many false hits this 
way, since any old mention of the search pattern, regardless of whether the 
man page author considered it a "key word" in the synoptic description of 
the command.

You should be aware, too, that these files are man page _sources_ written 
in nroff for the man macros (plus, possibly, tbl, eqn or others). This 
could cause further false hits. In some cases, it might even cause a miss.

The pre-formatted pages for things that have already been "manned" are in 
/usr/man/cat*, but the formatting, including lots of embedded grunk (like 
backspace-encoded overtyping to get bold) and hyphenation, make grepping 
problematic.

If you have no luck with apropos / man -k, then the grep technique might 
work. Once up a time on a non-Unix system (MPW), I created an "apropos" 
command that had options to control how much of a help file entry (the MPW 
equivalent to man pages) would be searched. The default was still just the 
synopsis.

By the way, I don't think speed would be a problem with your suggestion for 
me, but I have two fast CPUs and pretty much the fastest disks and I/O 
adaptor available today. From this standpoint, I'd suggest egrep, which I 
use for all my "grepping" needs.

Randall Schulz


At 15:26 2001-07-03, Jonadab the Unsightly One wrote:

># It may also be worth noting, since you are recommending this for
># newbies, that you have to type "/usr/sbin/makewhatis" to create the
># whatis database for apropos to be useful. ;-)
>
>Wouldn't it be just as easy to grep /usr/man/man1/*
>for your key word?  Or would that take longer?


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]