Hi there,
I have the xml file (HSBB_voice_20120925_0000000182.cdr.bc_lerr.xml) that contains data between tags that i want to extract.
<record record_no = "62" error_code="100">D20|000000063|56604960 071411E2 BC9D24B6 FDB63DEA|6088342010|0166662635|DEFAULT|1348579536|1348579538|3|0|IDD|Flat Rate
<record record_no = "63" error_code="100">D20|000000064|7A257C4E 071411E2 BC9D24B6 FDB63DEA|6088342010|0166662635|DEFAULT|1348579572|1348579620|48|0|IDD|Flat Rate
record no: 62, error code: 100, D20|000000063|56604960 071411E2 BC9D24B6 FDB63DEA|6088342010|0166662635|DEFAULT|1348579536|1348579538|3|0|IDD|Flat Rate
record no: 63, error code: 100, D20|000000064|7A257C4E 071411E2 BC9D24B6 FDB63DEA|6088342010|0166662635|DEFAULT|1348579572|1348579620|48|0|IDD|Flat Rate
what i have done so far is here :
#!/bin/sh
tmp=grep.log
output=output.log
file=`cat HSBB_voice_20120925_0000000182.cdr.bc_lerr.xml|grep "<record"|cat >> $tmp`
while read $file
do
------not sure,what to put here?------ | >> cat $output
done
-------------------------------------------------------------------------------------
so, any help guys? im confused right now T____T
thanks~~