The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

man - display system documentation

 SYNOPSIS



man [-k] name...

 DESCRIPTION

The man utility writes information about each of the name operands. If name is the name of a standard utility, man will at a minimum write a message describing the syntax used by the standard utility, its options and operands. If more information is available, the man utility will provide it in an implementation-dependent manner.

An implementation may provide information for values of name other than the standard utilities. Standard utilities that are listed as optional and that are not supported by the implementation either will cause a brief message indicating that fact to be displayed or will cause a full display of information as described previously.

 OPTIONS

The man utility supports the XBD specification, Utility Syntax Guidelines  .

The following option is supported:

-k
Interpret name operands as keywords to be used in searching a utilities summary database that contains a brief purpose entry for each standard utility and write lines from the summary database that match any of the keywords. The keyword search produces results that are the equivalent of the output of the following command:

grep -Ei '
name
name
' summary-database

This assumes that the summary-database is a text file with a single entry per line; this organisation is not required and the example using grep -Ei is merely illustrative of the type of search intended. The purpose entry to be included in the database consists of a terse description of the purpose of the utility.

 OPERANDS

The following operand is supported:
name
A keyword or the name of a standard utility. When -k is not specified and name does not represent one of the standard utilities, the results are unspecified.

 STDIN

Not used.

 INPUT FILES

None.

 ENVIRONMENT VARIABLES

The following environment variables affect the execution of man:
LANG
Provide a default value for the internationalisation variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation variables contains an invalid setting, the utility will behave as if none of the variables had been defined.
LC_ALL
If set to a non-empty string value, override the values of all the other internationalisation variables.
LC_CTYPE
Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and in the summary database). The value of LC_CTYPE need not affect the format of the information written about the name operands.
LC_MESSAGES
Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error and informative messages written to standard output.
NLSPATH
Determine the location of message catalogues for the processing of LC_MESSAGES .
PAGER
Determine an output filtering command for writing the output to a terminal. Any string acceptable as a command_string operand to the sh -c command is valid. When standard output is a terminal device, the manual-page output will be piped through the command. If the PAGER variable is null or not set, the command will be either more or another paginator utility documented in the system documentation.

 ASYNCHRONOUS EVENTS

Default.

 STDOUT

The man utility writes text describing the syntax of the utility name, its options and its operands, or, when -k is specified, lines from the summary database. The format of this text is implementation-dependent.

 STDERR

Used only for diagnostic messages.

 OUTPUT FILES

None.

 EXTENDED DESCRIPTION

None.

 EXIT STATUS

The following exit values are returned:
0
Successful completion.
>0
An error occurred.

 CONSEQUENCES OF ERRORS

Default.

 APPLICATION USAGE

None.

 EXAMPLES

None.

 FUTURE DIRECTIONS

The IEEE PASC 1003.2 Interpretations Committee has forwarded concerns about parts of this interface definition to the IEEE PASC Shell and Utilities Working Group which is identifying the corrections. A future revision of this specification will align with IEEE Std. 1003.2b when finalised.

 SEE ALSO

more.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]