GNU bash dump-po-strings 选项

问题描述 投票:0回答:1

在GNU bash手册参考(第6.1节:调用bash)中有一些选项,其中两个如下:

--dump-po-strings 在 GNU gettext PO(可移植的 对象)文件格式。除了输出格式之外,等同于 -D。

--dump-strings 相当于 -D。

但我不明白它们的含义。我也搜索了它们,不幸的是我没有找到例子。

有人可以用例子解释一下吗?

谢谢

bash arguments gnu
1个回答
0
投票

--dump-po-strings
用于创建翻译的输出格式。 https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html

$ echo 'echo $"text"' | bash --dump-po-strings
#: bash:1
msgid "text"
msgstr ""

--dump-strings
仅输出
$"this"
内的字符串。

$ echo 'echo $"text"' | bash --dump-strings
"text"
© www.soinside.com 2019 - 2024. All rights reserved.