1srchtxt(1)                       User Commands                      srchtxt(1)
2
3
4

NAME

6       srchtxt  - display contents of, or search for a text string in, message
7       data bases
8

SYNOPSIS

10       srchtxt [-s] [-l locale] [-m msgfile ,...] [text]
11
12

DESCRIPTION

14       The srchtxt utility is used to display all the text strings in  message
15       data  bases,  or to search for a text string in message data bases (see
16       mkmsgs(1)).   These   data   bases   are   files   in   the   directory
17       /usr/lib/locale/locale/LC_MESSAGES  (see  setlocale(3C)), unless a file
18       name given with the -m option contains a /. The directory locale can be
19       viewed  as the name of the language in which the text strings are writ‐
20       ten. If the -l option is not specified,  the  files  accessed  will  be
21       determined  by  the  value  of the environment variable LC_MESSAGES. If
22       LC_MESSAGES is not set, the files accessed will be  determined  by  the
23       value  of  the environment variable LANG. If LANG is not set, the files
24       accessed will be  in  the  directory  /usr/lib/locale//C/LC_MESSAGES  ,
25       which contains default strings.
26
27
28       If  no text argument is present, then all the text strings in the files
29       accessed will be displayed.
30
31
32       If the -s option is not specified, the displayed text  is  prefixed  by
33       message  sequence numbers. The message sequence numbers are enclosed in
34       angle brackets: <msgfile:msgnum>.
35
36       msgfile     name of the file where the displayed text occurred
37
38
39       msgnum      sequence  number  in  msgfile  where  the  displayed   text
40                   occurred
41
42
43
44       This display is in the format used by gettxt(1) and gettxt(3C).
45

OPTIONS

47       -s            Suppress  printing of the message sequence numbers of the
48                     messages being displayed.
49
50
51       -l locale     Access        files        in        the        directory
52                     /usr/lib/locale/locale/LC_MESSAGES. If -m msgfile is also
53                     supplied, lOCALE is ignored for msgfiles containing a /.
54
55
56       -m msgfile    Access files specified by one or more msgfiles.  If  msg‐
57                     file  contains a / character, then msgfile is interpreted
58                     as a pathname; otherwise, it will be assumed to be in the
59                     directory  determined as described above. To specify more
60                     than one msgfile, separate the file names using commas.
61
62
63       text          Search for the text string specified by text and  display
64                     each  one that matches. text can take the form of a regu‐
65                     lar expression; see regexp(5).
66
67

EXAMPLES

69       Example 1 Using srchtxt
70
71
72       If message files have been installed in a locale named french by  using
73       mkmsgs(1), then you could display the entire set of text strings in the
74       french locale (/usr/lib/locale/french/LC_MESSAGES/* ) by typing:
75
76
77         example% srchtxt −l french
78
79
80
81       Example 2 Using srchtxt
82
83
84       If a set of error messages associated with the  operating  system  have
85       been    installed    in    the   file   UX   in   the   french   locale
86       (/usr/lib/locale/french/LC_MESSAGE/UX ), then, using the value  of  the
87       LANG  environment  variable to determine the locale to be searched, you
88       could search that file in that locale for all  error  messages  dealing
89       with files by typing:
90
91
92         example% setenv LANG=french; export  LANG
93         example% srchtxt -m UX "[Ff]ichier"
94
95
96
97
98       If   /usr/lib/locale/french/LC_MESSAGES/UX    contained  the  following
99       strings:
100
101
102         Erreur E/S\n
103         Liste d'arguments trop longue\n
104         Fichier inexistant\n
105         Argument invalide\n
106         Trop de fichiers ouverts\n
107         Fichier trop long\n
108         Trop de liens\n
109         Argument hors du domaine\n
110         Identificateur supprim\n
111         Etreinte fatale\n
112           .
113           .
114           .
115
116
117
118       then the following strings would be displayed:
119
120
121         <UX:3>Fichier inexistant\n
122         <UX:5>Trop de fichiers ouverts\n
123         <UX:6>Fichier trop long\n
124
125
126
127       Example 3 Using srchtxt
128
129
130       If a set of error messages associated with the  operating  system  have
131       been  installed  in  the file UX and a set of error messages associated
132       with the INGRESS data base product have  been  installed  in  the  file
133       ingress,  both in the german locale, then you could search for the pat‐
134       tern [Dd]atei in both the files UX and ingress in the german locale  by
135       typing:
136
137
138         example% srchtxt -l german -m UX,ingress "[Dd]atei"
139
140
141

ENVIRONMENT VARIABLES

143       See  environ(5)  for a description of the LC_CTYPE environment variable
144       that affects the execution of srchtxt.
145

FILES

147       /usr/lib/locale/C/LC_MESSAGES/*
148
149           default files created by mkmsgs(1)
150
151
152       /usr/lib/locale/locale/LC_MESSAGES/*
153
154           message files created by mkmsgs(1)
155
156

ATTRIBUTES

158       See attributes(5) for descriptions of the following attributes:
159
160
161
162
163       ┌───────────────────────────────────────────────────────────┐
164ATTRIBUTE TYPE                ATTRIBUTE VALUE              
165       │Availability                  SUNWloc                      │
166       └───────────────────────────────────────────────────────────┘
167

SEE ALSO

169       exstr(1), gettxt(1), locale(1), mkmsgs(1),  gettxt(3C),  setlocale(3C),
170       attributes(5), environ(5), locale(5), regexp(5)
171

DIAGNOSTICS

173       The error messages produced by srchtxt are intended to be self-explana‐
174       tory. They indicate an error in the command line or errors  encountered
175       while searching for a particular locale and/or message file.
176
177
178
179SunOS 5.11                        20 Dec 1996                       srchtxt(1)
Impressum