【发布时间】:2016-02-03 21:49:09
【问题描述】:
<trans-unit id="OText.Meetwithcustomer">
<source>Meet with customer</source>
<target>\u015eedin\u0163\u0103 cu clientul
</target>
<note>A step in the sales stage of type qualification in a bid and in a project.</note>
<note>ID:240645::TYPE:Text/Data</note>
</trans-unit>
<trans-unit id="OText.Negotiate">
<source>Negotiate</source>
<target>Negociere</target>
<note>A step in the sales stage of type closed in a standard and in a project.</note>
<note>ID:240646::TYPE:Text/Data</note>
</trans-unit>
我将 trans-unit id 传递给脚本,在脚本内部,我试图获取该 trans-unit id 的目标标记值。 trans-unit id 值可以是 OText.Meetwithcustomer 或 OText.Negotiate。如果是 OText.Meetwithcustomer ,我需要获取值 \u015eedin\u0163\u0103 cu clientul,如果是 OText.Negotiate,我需要获取 Negociere。
如何在脚本文件中执行此操作。我正在寻找使用 sed/awk/grep 的答案 感谢您的帮助。
【问题讨论】:
-
您的样本与您的陈述相矛盾
<target>Negociere</target> -
我将 trans-unit id 传递给脚本,并且在脚本内部,我试图获取该 trans-unit id 的目标标签值。 trans-unit id 值可以是 OText.Meetwithcustomer 或 OText.Negotiate。如果是 OText.Meetwithcustomer ,我需要获取值 \u015eedin\u0163\u0103 cu clientul,如果是 OText.Negotiate,我需要获取 Negociere。