<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。如何提取unix中兩個標記之間的值
如何在腳本文件中執行此操作。我正在尋找一個使用sed/awk/grep的答案感謝您的幫助。
您的示例與您的陳述相矛盾' Negociere ' –
karakfa
我將傳遞單元ID傳遞給腳本,並在腳本內部,我試圖獲取該傳輸單元ID的目標標記值。 trans-unit id值可以是OText.Meetwithcustomer或OText.Negotiate。如果是OText.Meetwithcustomer,則需要獲取值\ u015eedin \ u0163 \ u0103 cu clientul,如果是OText.Negotiate,則需要獲取Negociere。 – arun
[從簡單的XML文件中提取數據]的可能的副本(http://stackoverflow.com/questions/2222150/extraction-of-data-from-a-simple-xml-file) – tripleee