|
Now it is more complicate:
Lets say the input file is:
ABC^1^~^data^x
ABC^2^~^data^x
ABC^3^~^data^x
DEF^4^~^data^y
DEF^4^~^data^z
DEF^5^~^data^y
DEF^5^~^data^z
DEF^6^~^data^z
DEF^6^~^data^y
XYZ^7^~^data^t
Now I would like to group couple of fields(field 2 and field 5)
My output should be:
ABC^1,2,3^~^data^x
DEF^4,5,6^~^data^y,z
XYZ^7^~^data^t
Notice that I would like to print all the line's fields.
Is it possible?
|