have a xml file with the following format:
first
lastcompanyaddr1addr22222addr3333Brisbane000AU<
PhoneNumber>1234512312
345email@au.comI7560
brazil1gghrrtrt
sape58340BR67778879gghj@jjk.com<
CnpjCpfId>25211178890CPFtestggh (This is line 5, it is even largest )
Requiriment:
I need to get is the following information: first last from the first label , and test from third label , company from the first label , and ggh from the third label and so on other information.
Problem:
I created a unix script file to read it using grep as follow:
grep filename.xml | cut -d\> -f2|cut -d\< -f1
and the result is the whole line in Line 5 described previously. How can I filter just to get the information I need from the file!?!?.
I will really appreciate your help to solve this problem.
Thank You!