Hi,
Need help.
My source file contain data like:
1 <?xml version="1.0"?> <Status>EGZAAE09</Status><Perform>002</Perform><DATE>2013-05-27</DATE>
1 <?xml version="1.0"?> <Status>ECBAE09</Status><Perform>002</Perform><DATE>2013-05-27</DATE>
2 <?xml version="1.0"?> <Status>Y78ZAAE08</Status><Perform>002</Perform><DATE>2013-05-27</DATE>
3 <?xml version="1.0"?> <Status>TRE8ZA9</Status><Perform>002</Perform><DATE>2013-05-27</DATE>
I need only <Status> value which is i'm getting with below command:
perl -nle 'print /(?<=Status>).*?(?=<\/Status>)/g' File_Name
Output is :
EGZAAE09
ECBAE09
Y78ZAAE08
TRE8ZA9
But i want row number also like:
1 EGZAAE09
1 ECBAE09
2 Y78ZAAE08
3 TRE8ZA9
Pls help me to get this