4

man -a <xyz> opens all the man pages one by one which contain xyz.
On my unix servers man -a <xyz> doesn't work.
Is there any alternative for this on unix?

EDIT:

I am on HP-UX. Following message :

hemantj [109]> man -a printf
Usage: man [-M path] [-T macro-package] [ section ] name ...
or: man -k keyword ...
or: man -f file ...
  • 2
    Why man -a doesn't work? Install a proper version of man. Try to debug it: strace man -a term 2> strace.out and echo $LANG Try to add your user to the man group. – bitek Aug 18 '10 at 16:03
  • What Unix are you exactly using: Solaris, HP-UX, AIX, *BSD? Also what does it mean "doesn't work": the -a option isn't recognized and man doesn't show anything or man shows only the first page? One more thing: could you give examples of <xyz> just to be sure that there are multiple sections on that subject? – Cristian Ciupitu Sep 1 '10 at 2:26
  • @cristian: I just updated my original question. – Hemant Sep 10 '10 at 11:22
  • what happens when you run man printf? – Cristian Ciupitu Sep 10 '10 at 17:46
  • @Cristian: man printf opens man page for printf(1) – Hemant Sep 12 '10 at 8:25
4

Does man -k work? If so, then:

man -k "$@" | cut -f1 -d' ' | xargs man

might do what you want

2

Is apropos available on the system? It can be used to search for man pages.

With a quick one-liner, it can come close to the man -a behaviour

man `apropos -el apt | awk -F")" '{print $1}' | awk -F"(" '{print $2, $1}'`
  • Thanks for reply. But apropos not available. – Hemant Aug 18 '10 at 13:24
  • 1
    apropos is functionally identical to (and usually implemented using) man -k. – Alexios Jan 24 '12 at 1:36
0

There are always emcas-based info pages:

$ info --apropos=man
$ info --apropos=info
  • 1
    Not necessarily (the Unix in question is HP-UX). Haven't used HP-UX since the late 90s so I don't have one handy, but GNU-based tools like info(1) aren't globally available unless we're talking about Linux. They certainly weren't available on SunOS and Solaris, and still aren't. You have to install the GNU tools separately, often by compiling them. – Alexios Jan 24 '12 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.