Linux command
msggrep 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Search for messages
msggrep -K -e "[pattern]" [input.po] -o [output.po]
Search in translations
msggrep -T -e "[pattern]" [input.po]
Search in source references
msggrep -N "[file.c]" [input.po]
Invert match
msggrep -v -K -e "[pattern]" [input.po]
Case insensitive search
msggrep -K -e "[pattern]" -i [input.po]
说明
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.
参数
- -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.
FAQ
What is the msggrep command used for?
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.
How do I run a basic msggrep example?
Run `msggrep -K -e "[pattern]" [input.po] -o [output.po]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -K do in msggrep?
Search in msgid (key).