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

NAME

6       msggrep - pattern matching on message catalog
7

SYNOPSIS

9       msggrep [OPTION] [INPUTFILE]
10

DESCRIPTION

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 EX‐
37              TRACTED-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 se‐
49       lected 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       --color
109              use colors and other text attributes always
110
111       --color=WHEN
112              use colors and other text attributes if WHEN.  WHEN may be  'al‐
113              ways', 'never', 'auto', or 'html'.
114
115       --style=STYLEFILE
116              specify CSS style rule file for --color
117
118       --no-escape
119              do not use C escapes in output (default)
120
121       --escape
122              use C escapes in output, no extended chars
123
124       --force-po
125              write PO file even if empty
126
127       --indent
128              indented output style
129
130       --no-location
131              suppress '#: filename:line' lines
132
133       -n, --add-location
134              preserve '#: filename:line' lines (default)
135
136       --strict
137              strict Uniforum output style
138
139       -p, --properties-output
140              write out a Java .properties file
141
142       --stringtable-output
143              write out a NeXTstep/GNUstep .strings file
144
145       -w, --width=NUMBER
146              set output page width
147
148       --no-wrap
149              do  not  break  long  message lines, longer than the output page
150              width, into several lines
151
152       --sort-output
153              generate sorted output
154
155       --sort-by-file
156              sort output by file location
157
158   Informative output:
159       -h, --help
160              display this help and exit
161
162       -V, --version
163              output version information and exit
164

AUTHOR

166       Written by Bruno Haible.
167

REPORTING BUGS

169       Report    bugs    in    the    bug    tracker    at     <https://savan
170       nah.gnu.org/projects/gettext> or by email to <bug-gettext@gnu.org>.
171
173       Copyright  ©  2001-2023 Free Software Foundation, Inc.  License GPLv3+:
174       GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
175       This is free software: you are free  to  change  and  redistribute  it.
176       There is NO WARRANTY, to the extent permitted by law.
177

SEE ALSO

179       The  full  documentation for msggrep is maintained as a Texinfo manual.
180       If the info and msggrep programs are properly installed at  your  site,
181       the command
182
183              info msggrep
184
185       should give you access to the complete manual.
186
187
188
189GNU gettext-tools 0.22             June 2023                        MSGGREP(1)
Impressum