dspmsg looks for the named message catalog in the paths specified by the environment variable NLSPATH. If NLSPATH is not defined, dspmsg looks in the default message catalog directory.
The default set number set# used is 1; you can specify a different set number using the -s option.
You may specify a default message (default_message) that dspmsg must display if it cannot find the message specified by catalog, set#, and msg#. You should enclose the entire default message in single quotes.
dspmsg allows you to substitute up to 10 arguments into a message. You can use all the format conversion specifications allowed by printf(1) within messages. dspmsg replaces missing arguments with a default value (0, 0.0, or a null string depending on the conversion).
You must specify a default message if you wish to supply arguments.
The following displays message 9 from set 5 of message catalog
top.cat; it displays no such message
if the
message cannot be found:
dspmsg top.cat -s 5 9 'no such message\n'
Using dspmsg with message catalogs allows you to modify
the output from shell scripts without altering the shell script itself.
For example, the following line from a shell script:
echo "Counted $count lines in file $filename"
could be replaced by:
dspmsg msg.cat 3 'Counted %1$d lines in file %2$s\n' $count $filename
where the default message will be used if message 3 cannot be found in the catalog msg.cat. See gencat(1) for more information on creating message catalogs.