Move text around on xml using sed

elifeWate

New Member
Can someone help me with sed command? i'm not so good with that :) I removed the \[code\]<title lang="en">\[/code\] line and let only the "pt" line.. (device limitation)
this i already did and it's working fine, like this: \[code\]sed -i '/<title lang=\"en\">/d' xmltv_clarotv.xml \[/code\]now, i'm trying to do the code that i said and plus get the content from \[code\]<date></date>\[/code\] and put it inside the \[code\]<title lang="pt">\[/code\] that should result in something like this:
\[code\]<title lang="pt">[2011] Gigantes de A?o</title>\[/code\] note that not every \[code\]<programme>\[/code\] have the field \[code\]<date>\[/code\]
can someone give me an help with that? it need be with \[code\]sed\[/code\] command and the device that i'll execute it does not have much RAM and native functions... i'm trying do that because the device that will parse it only recognize the 'title' and 'desc' field...A little piece of the xml:\[code\]<programme start="20120923200000 -0300" stop="20120923222500 -0300" channel="T4H" program_id="0000278093" event_id="000000000887005" series_key=""><title lang="pt">Gigantes de A?o</title><title lang="en">Real Steel</title><desc>Viva a adrenalina e o frenesi de uma atividade como a luta de Rob?s. Esta
 
Back
Top