dspmsg.1 (2010 09)
d
dspmsg(1) dspmsg(1)
NAME
dspmsg - display a selected message from a message catalog
SYNOPSIS
dspmsg [-e | -E][-s
set_number ] catalog_name message_number [’default_string’[argument ...
]]
DESCRIPTION
The
dspmsg command displays a particular message from a message catalog. The display may include a
message identifier, depending on the presence of the
-e or -E option and settings for the
CAT_MIDSET_catname, CAT_MIDSET, and CAT_MIDFMT environment variables. A message identifier
consists of one of more of the following items: the catalog name, the set number, and the message
number. See the subsection Displaying Message Identifiers with Messages below for more information
about these environment variables.
Options
The
dspmsg command recognizes the following options:
-e Specifies that message identifiers be displayed along with message strings, but only
for those message sets specified by the
CAT_MIDSET_catname or CAT_MIDSET
environment variables.
You can override the default format of the message identifier by defining the
CAT_MIDFMT_catname or CAT_MIDFMT environment variable. See the subsection
Using the CAT_MIDFMT* Environment Variables for more information.
-E Specifies that the message identifier is displayed for messages in all message sets
under control of the CAT_MIDFMT environment variable. If you use this option, the
CAT_MIDSET* environment variables have no effect. However, you must explicitly
define one of the CAT_MIDFMT* environment variables to display the message
identifiers. When you use this option, if the message catalog is not found and the
default_string argument is omitted, the message identifier is displayed by itself.
For example, /du/3/2: will be displayed if the catalog_name is du and the
message_number is 2
and the set_number is 3.
-s Specifies the set number. If not specified, dspmsg searches for messages in the
first message set.
Operands
The
dspmsg command recognizes the following operands:
catalog_name Specifies the name of a message catalog. By default
dspmsg searches for the cata-
log in the set of directories specified by the NLSPATH environment variable and
then in the current directory. The NLSPATH search can be disabled by prefixing a
path name to the catalog. For more information about NLSPATH, see environ (5).
message_number
Specifies the message number in the specified set.
If the
-s option is omitted, dspmsg only searches for the message in the first mes-
sage set in the catalog.
default_string Specifies the message for the command to display if
dspmsg cannot find a message
with the specified number in the catalog. If the message includes the %n$s nota-
tion for message inserts, either enclose the default message in single quotes or
escape the $ character in the insertion notation (%n\$s).
argument ... Specifies arguments (up to 10) to be inserted in the catalog message or default mes-
sage if it contains either the
%s or the %n$s printf() conversion specifications.
You must include the default_string argument in order to specify message insertion
arguments.
You must specify the message catalog (catalog_name ) and the message (message_number). You must also
specify the message set (set_number ) if the catalog has more than one message set and the specified mes-
sage is not in the first set.
The
dspmsg command displays the default_string value if the specified message is not found in the cata-
log or the catalog cannot be found or opened. Usually default_string is identical to the message in the
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1