I have a file with variable length rows
i.e.:
val1:data1;val2:data2;val3:data3
val4:data4
val5:data5;val6:data6
i need to split values and data, such that all values are in one string and all data in the other
Please advise on the ways to do it
split data row
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Pre-process the file (with tr perhaps) to convert all the ";" characters to line terminators - that way you will have one value:data pair per line. If you use tr as the filter command on a Sequential File stage, the stage will read stdout from the tr command as the source.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.