#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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.