Author: sreekusr
Subject: Count the length of the record & display in a new line
Posted: Thu Mar 23, 2017 7:52 pm (GMT 5.5)
Hi All,
Please could someone help me with a clever SORT to tackle below task -
Input file (FB dataset - XML way)
Expected Output
Thanks in advance.
Subject: Count the length of the record & display in a new line
Posted: Thu Mar 23, 2017 7:52 pm (GMT 5.5)
Hi All,
Please could someone help me with a clever SORT to tackle below task -
Input file (FB dataset - XML way)
Code: |
<DATARECORDS>ABCD EF</FRMTDDATA> <DATARECORDS>GHIJKLM</FRMTDDATA> <DATARECORDS>NO P</FRMTDDATA> <DATARECORDS>QRST UVWXYZ</FRMTDDATA> |
Expected Output
Code: |
DATA,33 <DATARECORDS>ABCD EF</FRMTDDATA> DATA,32 <DATARECORDS>GHIJKLM</FRMTDDATA> DATA,29 <DATARECORDS>NO P</FRMTDDATA> DATA,37 <DATARECORDS>QRST UVWXYZ</FRMTDDATA> |
Thanks in advance.