0

OpenSUSE 12.01, KDE, kernel 3.1.9-1.4-default

Trying to get all man pages. Basically the answer is apropos . or man -k .. Why does apropos \* only returns about 300 man pages while apropos . returns close to 60,000 and in a lot less time? I get that the former is doing a search and compare op and therefor is slower while the latter just belched out whatever it found. However, why does \* becomes a search operation while ., also a regexp, becomes a listing operation?

PS: apparently I had to type \\\* to get \*, interesting.

1 Answer 1

1

To begin with, try the following commands in a terminal:

echo *
echo \*
echo '*'

The unquoted/unescaped asterisk will be expanded before apropos gets it, and will thus do as many searches as you have files in the current directory.

apropos '*' is an invalid regex search; you'd need apropos '.*' ("match any character 0 or more times"), but that will give the same result as just apropos ..

1
  • Cool, I struggled with that for a while with my first bash script. Completely forgot. Thanks,
    – VNElectric
    May 10, 2012 at 15:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .