1MSGGREP(1) GNU MSGGREP(1)
2
3
4
6 msggrep - pattern matching on message catalog
7
9 msggrep [OPTION] [INPUTFILE]
10
12 Extracts all messages of a translation catalog that match a given pat‐
13 tern or belong to some given source files.
14
15 Mandatory arguments to long options are mandatory for short options
16 too.
17
18 Input file location:
19 INPUTFILE
20 input PO file
21
22 -D, --directory=DIRECTORY
23 add DIRECTORY to list for input files search
24
25 If no input file is given or if it is -, standard input is read.
26
27 Output file location:
28 -o, --output-file=FILE
29 write output to specified file
30
31 The results are written to standard output if no output file is speci‐
32 fied or if it is -.
33
34 Message selection:
35 [-N SOURCEFILE]... [-M DOMAINNAME]... [-J MSGCTXT-PATTERN] [-K
36 MSGID-PATTERN] [-T MSGSTR-PATTERN] [-C COMMENT-PATTERN] [-X
37 EXTRACTED-COMMENT-PATTERN]
38
39 A message is selected if it comes from one of the specified source
40 files, or if it comes from one of the specified domains, or if -J is
41 given and its context (msgctxt) matches MSGCTXT-PATTERN, or if -K is
42 given and its key (msgid or msgid_plural) matches MSGID-PATTERN, or if
43 -T is given and its translation (msgstr) matches MSGSTR-PATTERN, or if
44 -C is given and the translator's comment matches COMMENT-PATTERN, or if
45 -X is given and the extracted comment matches EXTRACTED-COMMENT-PAT‐
46 TERN.
47
48 When more than one selection criterion is specified, the set of
49 selected messages is the union of the selected messages of each crite‐
50 rion.
51
52 MSGCTXT-PATTERN or MSGID-PATTERN or MSGSTR-PATTERN or COMMENT-PATTERN
53 or EXTRACTED-COMMENT-PATTERN syntax:
54
55 [-E | -F] [-e PATTERN | -f FILE]...
56
57 PATTERNs are basic regular expressions by default, or extended regular
58 expressions if -E is given, or fixed strings if -F is given.
59
60 -N, --location=SOURCEFILE
61 select messages extracted from SOURCEFILE
62
63 -M, --domain=DOMAINNAME
64 select messages belonging to domain DOMAINNAME
65
66 -J, --msgctxt
67 start of patterns for the msgctxt
68
69 -K, --msgid
70 start of patterns for the msgid
71
72 -T, --msgstr
73 start of patterns for the msgstr
74
75 -C, --comment
76 start of patterns for the translator's comment
77
78 -X, --extracted-comment
79 start of patterns for the extracted comment
80
81 -E, --extended-regexp
82 PATTERN is an extended regular expression
83
84 -F, --fixed-strings
85 PATTERN is a set of newline-separated strings
86
87 -e, --regexp=PATTERN
88 use PATTERN as a regular expression
89
90 -f, --file=FILE
91 obtain PATTERN from FILE
92
93 -i, --ignore-case
94 ignore case distinctions
95
96 -v, --invert-match
97 output only the messages that do not match any selection crite‐
98 rion
99
100 Input file syntax:
101 -P, --properties-input
102 input file is in Java .properties syntax
103
104 --stringtable-input
105 input file is in NeXTstep/GNUstep .strings syntax
106
107 Output details:
108 --no-escape
109 do not use C escapes in output (default)
110
111 --escape
112 use C escapes in output, no extended chars
113
114 --force-po
115 write PO file even if empty
116
117 --indent
118 indented output style
119
120 --no-location
121 suppress '#: filename:line' lines
122
123 --add-location
124 preserve '#: filename:line' lines (default)
125
126 --strict
127 strict Uniforum output style
128
129 -p, --properties-output
130 write out a Java .properties file
131
132 --stringtable-output
133 write out a NeXTstep/GNUstep .strings file
134
135 -w, --width=NUMBER
136 set output page width
137
138 --no-wrap
139 do not break long message lines, longer than the output page
140 width, into several lines
141
142 --sort-output
143 generate sorted output
144
145 --sort-by-file
146 sort output by file location
147
148 Informative output:
149 -h, --help
150 display this help and exit
151
152 -V, --version
153 output version information and exit
154
156 Written by Bruno Haible.
157
159 Report bugs to <bug-gnu-gettext@gnu.org>.
160
162 Copyright © 2001-2007 Free Software Foundation, Inc. License GPLv3+:
163 GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
164 This is free software: you are free to change and redistribute it.
165 There is NO WARRANTY, to the extent permitted by law.
166
168 The full documentation for msggrep is maintained as a Texinfo manual.
169 If the info and msggrep programs are properly installed at your site,
170 the command
171
172 info msggrep
173
174 should give you access to the complete manual.
175
176
177
178GNU gettext-tools 0.17 November 2007 MSGGREP(1)