I thought I could totally replace “apropos” (in my mind :)) and just use “man -k”.
In “man man”, I saw: man -k [apropos options] regexp
Here is the apropos version of a sample search:
apropos -s 1 stat
The man version:
man -k -s 1 stat
The [apropos options], in this case -s 1, was ignored, and all sections searched, not just 1.
Looking around, I have the environment variable, “MAN_POSIXLY_CORRECT”, so I don’t get the prompt when a man name appears more than once (it’s not documented in “man man”). Additional searching and testing didn’t turn anything up.
Is the documentation incorrect? Is my command malformed?
On Tue, 12 Oct 2010 22:06:01 +0000, opensuseforumorg42 wrote:
> apropos -s 1 stat
>
> The man version:
>
> man -k -s 1 stat
>
> The [apropos options], in this case -s 1, was ignored, and all sections
> searched, not just 1.
man -k printf
Search the short descriptions and manual page names for
the keyword printf as regular expression. Print out any matches.
Equivalent to apropos -r printf.
it says man -k == apropos -r, but not man -k [apropos options] ==
apropos -r [apropos options]