LinuxCommandLibrary

msggrep

searches PO files for messages

TLDR

Search for messages

$ msggrep -K -e "[pattern]" [input.po] -o [output.po]
copy
Search in translations
$ msggrep -T -e "[pattern]" [input.po]
copy
Search in source references
$ msggrep -N "[file.c]" [input.po]
copy
Invert match
$ msggrep -v -K -e "[pattern]" [input.po]
copy
Case insensitive search
$ msggrep -K -e "[pattern]" -i [input.po]
copy

SYNOPSIS

msggrep [options] [inputfile]

DESCRIPTION

msggrep searches PO files for messages. It's part of GNU gettext.
The tool filters messages by pattern. Extracts matching entries to new PO file.

PARAMETERS

INPUTFILE

PO file to search.
-K
Search in msgid (key).
-T
Search in msgstr (translation).
-e PATTERN
Regular expression pattern.
-N FILE
Search by source reference.
-v
Invert match.
--help
Display help information.

CAVEATS

Part of gettext-tools. Regex syntax. Use -K for keys, -T for translations.

HISTORY

msggrep is part of GNU gettext, providing search functionality for translation files.

SEE ALSO

msgfilter(1), msgconv(1), grep(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community