There's probably an easier way, but I find man -K can be combined with -w to print the paths of the files that contain the search terms, and you could combine that with lexgrog for instance to extract the whatis info:
$ man -Kws1 apropos | sort -u | xargs -rd '\n' lexgrog | perl -pe's/.*?: "(.*)"/$1/'
apropos - search the manual page names and descriptions
emacs - GNU project Emacs editor
groffer - display groff files and man pages on X and tty
info - read Info documents
lexgrog - parse header information in man pages
man - an interface to the system reference manuals
manpath - determine search path for manual pages
scanimage - scan an image
whatis - display one-line manual page descriptions
xman - Manual page display program for the X Window System
(here assuming GNU xargs for it's -r and -d options, though the latter is unlikely to be necessary)
You could turn it into a full-apropos script or function such as:
#! /bin/sh -
man -Kw "$@" |
sort -u |
xargs -rd '\n' lexgrog |
perl -pe's/.*?: "(.*)"/$1/'
We're missing the man section information though. Since that is in the path of the file, we could add it back with something like:
#! /bin/sh -
man -Kw "$@" |
sort -u |
while IFS= read -r file; do
section=${file%/*}
section=${section##*/man}
lexgrog -- "$file" |
perl -spe's/.*?: "(.*)"/$1/; s/ - / ($s)$&/' -- "-s=$section"
done