Filtering the input file with certain rules
I have file having follwing input :
1 ABCD : M1-1-74 , A1-9 , M2-1-74 ,
2 EFGH : 4-3-2 , 2-44 , 1-44 ,
3 HIJK : 5-1-13 , 19-2-37 , 6-1-13 , 20-2-37 ,
Output file :
1 ABCD : A1-9 ,M1-1-74 , M2-1-74 ,
2 EFGH : 4-3-2 , 2-44 , 1-44 ,
3 HIJK : 5-1-13 , 6-1-13 , 20-2-37 , 19-2-37 ,
Explanation of output :
1 ABCD : A1-9 ,M1-1-74 , M2-1-74 , ----> i.e common of (M1/M2-1-74) comes together and different A1-9 comes at first.
2 EFGH : 4-3-2 , 2-44 , 1-44 , ----> i.e Common of (1/2-44) comes together and different 4-3-2 comes at first.
3 HIJK : 5-1-13 , 6-1-13 , 20-2-37 , 19-2-37 , --------> i.e Common of 5/6-1-13 comes together and 20/19-2-37 comes together.
Last edited by sumit.inform; 08-05-2013 at 07:59 PM.
Reason: Adding More info.
|