Debian Codegraph @

upstream/debian-unstable/man1/msggrep.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
2 .TH MSGGREP "1" "July 2025" "GNU gettext-tools 0.26" "User Commands"
3 .SH NAME
4 msggrep \- pattern matching on message catalog
5 .SH SYNOPSIS
6 .B msggrep
7 [\fI\,OPTION\/\fR] [\fI\,INPUTFILE\/\fR]
8 .SH DESCRIPTION
9 .\" Add any additional description here
10 .PP
11 Extracts all messages of a translation catalog that match a given pattern
12 or belong to some given source files.
13 .PP
14 Mandatory arguments to long options are mandatory for short options too.
15 .SS "Input file location:"
16 .TP
17 INPUTFILE
18 input PO file
19 .TP
20 \fB\-D\fR, \fB\-\-directory\fR=\fI\,DIRECTORY\/\fR
21 add DIRECTORY to list for input files search
22 .PP
23 If no input file is given or if it is \-, standard input is read.
24 .SS "Output file location:"
25 .TP
26 \fB\-o\fR, \fB\-\-output\-file\fR=\fI\,FILE\/\fR
27 write output to specified file
28 .PP
29 The results are written to standard output if no output file is specified
30 or if it is \-.
31 .SS "Message selection:"
32 .IP
33 [\-N SOURCEFILE]... [\-M DOMAINNAME]...
34 [\-J MSGCTXT\-PATTERN] [\-K MSGID\-PATTERN] [\-T MSGSTR\-PATTERN]
35 [\-C COMMENT\-PATTERN] [\-X EXTRACTED\-COMMENT\-PATTERN]
36 [\-W WORKFLOW\-FLAG] [\-S STICKY\-FLAG]
37 .PP
38 A message is selected if it comes from one of the specified source files,
39 or if it comes from one of the specified domains,
40 or if \fB\-J\fR is given and its context (msgctxt) matches MSGCTXT\-PATTERN,
41 or if \fB\-K\fR is given and its key (msgid or msgid_plural) matches MSGID\-PATTERN,
42 or if \fB\-T\fR is given and its translation (msgstr) matches MSGSTR\-PATTERN,
43 or if \fB\-C\fR is given and the translator's comment matches COMMENT\-PATTERN,
44 or if \fB\-X\fR is given and the extracted comment matches EXTRACTED\-COMMENT\-PATTERN,
45 or if \fB\-W\fR is given and its flags contain WORKFLOW\-FLAG,
46 or if \fB\-S\fR is given and its flags contain STICKY\-FLAG.
47 .PP
48 When more than one selection criterion is specified, the set of selected
49 messages is the union of the selected messages of each criterion.
50 .PP
51 MSGCTXT\-PATTERN or MSGID\-PATTERN or MSGSTR\-PATTERN or COMMENT\-PATTERN or
52 EXTRACTED\-COMMENT\-PATTERN syntax:
53 .IP
54 [\-E | \fB\-F]\fR [\-e PATTERN | \fB\-f\fR FILE]...
55 .PP
56 PATTERNs are basic regular expressions by default, or extended regular
57 expressions if \fB\-E\fR is given, or fixed strings if \fB\-F\fR is given.
58 .TP
59 \fB\-N\fR, \fB\-\-location\fR=\fI\,SOURCEFILE\/\fR
60 select messages extracted from SOURCEFILE
61 .TP
62 \fB\-M\fR, \fB\-\-domain\fR=\fI\,DOMAINNAME\/\fR
63 select messages belonging to domain DOMAINNAME
64 .TP
65 \fB\-J\fR, \fB\-\-msgctxt\fR
66 start of patterns for the msgctxt
67 .TP
68 \fB\-K\fR, \fB\-\-msgid\fR
69 start of patterns for the msgid
70 .TP
71 \fB\-T\fR, \fB\-\-msgstr\fR
72 start of patterns for the msgstr
73 .TP
74 \fB\-C\fR, \fB\-\-comment\fR
75 start of patterns for the translator's comment
76 .TP
77 \fB\-X\fR, \fB\-\-extracted\-comment\fR
78 start of patterns for the extracted comment
79 .TP
80 \fB\-E\fR, \fB\-\-extended\-regexp\fR
81 PATTERN is an extended regular expression
82 .TP
83 \fB\-F\fR, \fB\-\-fixed\-strings\fR
84 PATTERN is a set of newline\-separated strings
85 .TP
86 \fB\-e\fR, \fB\-\-regexp\fR=\fI\,PATTERN\/\fR
87 use PATTERN as a regular expression
88 .TP
89 \fB\-f\fR, \fB\-\-file\fR=\fI\,FILE\/\fR
90 obtain PATTERN from FILE
91 .TP
92 \fB\-i\fR, \fB\-\-ignore\-case\fR
93 ignore case distinctions
94 .TP
95 \fB\-W\fR, \fB\-\-workflow\-flag\fR=\fI\,FLAG\/\fR
96 select messages with FLAG
97 .TP
98 \fB\-S\fR, \fB\-\-sticky\-flag\fR=\fI\,FLAG\/\fR
99 select messages with FLAG
100 .TP
101 \fB\-v\fR, \fB\-\-invert\-match\fR
102 output only the messages that do not match any
103 selection criterion
104 .SS "Input file syntax:"
105 .TP
106 \fB\-P\fR, \fB\-\-properties\-input\fR
107 input file is in Java .properties syntax
108 .TP
109 \fB\-\-stringtable\-input\fR
110 input file is in NeXTstep/GNUstep .strings syntax
111 .SS "Output details:"
112 .TP
113 \fB\-\-color\fR
114 use colors and other text attributes always
115 .TP
116 \fB\-\-color\fR=\fI\,WHEN\/\fR
117 use colors and other text attributes if WHEN.
118 WHEN may be 'always', 'never', 'auto', or 'html'.
119 .TP
120 \fB\-\-style\fR=\fI\,STYLEFILE\/\fR
121 specify CSS style rule file for \fB\-\-color\fR
122 .TP
123 \fB\-\-no\-escape\fR
124 do not use C escapes in output (default)
125 .TP
126 \fB\-\-escape\fR
127 use C escapes in output, no extended chars
128 .TP
129 \fB\-\-force\-po\fR
130 write PO file even if empty
131 .TP
132 \fB\-\-indent\fR
133 indented output style
134 .TP
135 \fB\-\-no\-location\fR
136 suppress '#: filename:line' lines
137 .TP
138 \fB\-n\fR, \fB\-\-add\-location\fR
139 preserve '#: filename:line' lines (default)
140 .TP
141 \fB\-\-strict\fR
142 strict Uniforum output style
143 .TP
144 \fB\-p\fR, \fB\-\-properties\-output\fR
145 write out a Java .properties file
146 .TP
147 \fB\-\-stringtable\-output\fR
148 write out a NeXTstep/GNUstep .strings file
149 .TP
150 \fB\-w\fR, \fB\-\-width\fR=\fI\,NUMBER\/\fR
151 set output page width
152 .TP
153 \fB\-\-no\-wrap\fR
154 do not break long message lines, longer than
155 the output page width, into several lines
156 .TP
157 \fB\-\-sort\-output\fR
158 generate sorted output
159 .TP
160 \fB\-\-sort\-by\-file\fR
161 sort output by file location
162 .SS "Informative output:"
163 .TP
164 \fB\-h\fR, \fB\-\-help\fR
165 display this help and exit
166 .TP
167 \fB\-V\fR, \fB\-\-version\fR
168 output version information and exit
169 .SH AUTHOR
170 Written by Bruno Haible.
171 .SH "REPORTING BUGS"
172 Report bugs in the bug tracker at <https://savannah.gnu.org/projects/gettext>
173 or by email to <bug\[email protected]>.
174 .SH COPYRIGHT
175 Copyright \(co 2001\-2025 Free Software Foundation, Inc.
176 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
177 .br
178 This is free software: you are free to change and redistribute it.
179 There is NO WARRANTY, to the extent permitted by law.
180 .SH "SEE ALSO"
181 The full documentation for
182 .B msggrep
183 is maintained as a Texinfo manual. If the
184 .B info
185 and
186 .B msggrep
187 programs are properly installed at your site, the command
188 .IP
189 .B info msggrep
190 .PP
191 should give you access to the complete manual.