srchtxt(1) srchtxt(1)
NAME
srchtxt - display contents of, or search for a text string in, message
databases
SYNOPSIS
srchtxt[ option]...[ text]
DESCRIPTION
srchtxt is used to display the contents of AT&T-style message files or
to search for text strings in such files.
The srchtxt utility can display all the message strings which are in a
message database or search the message databases for a particular
string (see also mkmsgs). Message databases are files in the directory
/usr/lib/locale/Locale/LCMESSAGES, where the directory name Locale
stands for the name of the language in which the message strings are
written. You can use the -m option to specify a different path name.
OPTIONS
No option specified:
The environment variable LCMESSAGES determines the locale to be
searched by srchtxt. If LCMESSAGES is not set, the value of the
environment variable LANG is used.
-s Suppresses printing of the sequence number of each message
displayed.
-l Locale
The message database are located in the directory
/usr/lib/locale/Locale/LCMESSAGES.
-l not specified:
The value of the environment variable LCMESSAGES determines the
locale to be searched. If LCMESSAGES is not set, the value of
the environment variable LANG is used.
If -l is used in combination with -m msgfile, Locale is ignored
for any msgfile which contains a slash, i.e. which represents a
path name.
-m msgfile
srchtxt displays or searches msgfile. If more than one msgfile is
named, the individual file names must be separated using commas.
If msgfile contains a slash, it is interpreted as a path name;
otherwise, srchtxt will look for it in the directory determined
as described above.
text Search for the specified text string and display each occurrence.
text can also take the form of a regular expression (see ed).
Page 1 Reliant UNIX 5.44 Printed 11/98
srchtxt(1) srchtxt(1)
text not specified:
All the text strings in the files accessed are displayed.
Output format
The displayed message texts are prefixed by their message sequence
numbers and the file name, enclosed in angle brackets:
<msgfile:msgnum>
where msgfile is the file which contains the message text that fol-
lows, and msgnum is the sequence number of that message within
msgfile.
The output is otherwise in the same format as described under gettxt.
LOCALE
The LCMESSAGES environment variable governs the language in which
message texts are displayed. If LCMESSAGES is undefined or is defined
as the null string, it defaults to the value of LANG. If LANG is like-
wise undefined or null, the system acts as if it were not internation-
alized.
The LCALL environment variable governs the entire locale. LCALL
takes precedence over all the other environment variables which affect
internationalization.
SEE ALSO
ed(1), exstr(1), gettxt(1), mkmsgs(1), gettxt(3C), setlocale(3C).
Page 2 Reliant UNIX 5.44 Printed 11/98