SUNWloc
If no text argument is present, then all the text strings in the files accessed will be displayed.
If the -s option is not specified, the displayed text is prefixed by message sequence numbers. The message sequence numbers are enclosed in angle brackets: <msgfile:msgnum>.
This display is in the format used by gettxt(1) and gettxt(3C) .
Example 1:
If message files have been installed in a locale named french by using mkmsgs(1) , then you could display the entire set of text strings in the french locale (/usr/lib/locale/french/LC_MESSAGES /*) by typing:
example% srchtxt -l french
Example 2:
If a set of error messages associated with the operating system have been installed in the file UX in the french locale (/usr/lib/locale/french/LC_MESSAGES/UX ), then, using the value of the LANG environment variable to determine the locale to be searched, you could search that file in that locale for all error messages dealing with files by typing:
example% setenv LANG =french; export LANG
example% srchtxt -m UX "[Ff]ichier"If /usr/lib/locale/french/LC_MESSAGES/UX contained the following strings:
Erreur E/S\n Liste d’arguments trop longue\n Fichier inexistant\n Argument invalide\n Trop de fichiers ouverts\n Fichier trop long\n Trop de liens\n Argument hors du domaine\n Identificateur supprim\n Etreinte fatale\n . . .then the following strings would be displayed:
<UX:3>Fichier inexistant\n <UX:5>Trop de fichiers ouverts\n <UX:6>Fichier trop long\n
Example 3:
If a set of error messages associated with the operating system have been installed in the file UX and a set of error messages associated with the INGRESS data base product have been installed in the file ingress, both in the german locale, then you could search for the pattern [Dd]atei in both the files UX and ingress in the german locale by typing:
example% srchtxt -l german -m UX,ingress "[Dd]atei"
If any of the LC_*
variables ( LC_CTYPE, LC_MESSAGES
, LC_TIME, LC_COLLATE, LC_NUMERIC, and
LC_MONETARY
) (see environ(5)
) are not set in the environment, the operational
behavior of srchtxt for each corresponding locale category is determined
by the value of the LANG
environment variable. If LC_ALL
is set, its
contents are used to override both the LANG
and the other LC_*
variables.
If none of the above variables is set in the environment, the "C" (U.S.
style) locale determines how srchtxt behaves.
Files
See Also
exstr(1)
, gettxt(1)
, mkmsgs(1)
,
gettxt(3C)
, setlocale(3C)
, environ(5)
, regexp(5)
Diagnostics
The error messages
produced by srchtxt are intended to be self-explanatory. They indicate an
error in the command line or errors encountered while searching for a particular
locale and/or message file.