#21 Digging Around in the Man Page Database

The Unix man command has a tremendously useful option that produces a list of man pages whose descriptions include the specified word. Usually this functionality is accessible as man -k word, but it can also be invoked using the apropos or whatis commands.

Searching for a word with the man command is helpful, but it's really only half the story, because once you have a set of matches, you still might find yourself performing a brute-force search for the specific command you want, going one man page at a time.

As a smarter alternative, this script generates a list of possible man page matches for a particular pattern and then searches each of those matching pages for a second search pattern. To constrain ...

Get Wicked Cool Shell Scripts now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.