Specify the sector of manpage

man

When man declare in bash, I get the manpage of declarein sql. But I would like to get the manage of declare in shell. How can I do that?

Best Answer

The information for declare in bash doesn't have a manpage for itself, it's part of man bash.

You can access the information for bash's declare using help declare, or help -m declare if you like the manpage layout. or search for declare within the bash manpage.

In general, when there are more then one manpage with the same name, you specify the one you need using the section number, such as man 1 info for the info program and man 5 info for the info file format. or you can do man -a info to see them all.

To know which file will be opened, do man -w commend, so man -aw command shows them all.

Related Question