Hi,
I have 2 files that I got as an output from another program. They are :
File 1
((((((CtBJa:197.0,CtBTz:197.0):85.0,CtAHr:197.0):116.0,CtDUw:197.0):176.0,CtSwe:197.0):110.0,
(CtL2b:197.0,Ct4Bu:197.0):196.0):197.0,CmuNg:197.0);
((((CtL2b:200.0,Ct4Bu:200.0):177.0,((CtAHr:200.0,CtBJa:200.0):77.0,(CtBTz:200.0,
CtDUw:200.0):84.0):127.0):130.0,CtSwe:200.0):200.0,CmuNg:200.0);
(((CtBJa:200.0,CtAHr:200.0):102.0,(((Ct4Bu:200.0,(CtBTz:200.0,CtSwe:200.0):147.0):115.0,
CtDUw:200.0):73.0,CtL2b:200.0):105.0):200.0,CmuNg:200.0);
((((((CtBTz:200.0,CtAHr:200.0):70.0,CtDUw:200.0):68.0,CtBJa:200.0):172.0,(Ct4Bu:200.0,
CtL2b:200.0):178.0):135.0,CtSwe:200.0):200.0,CmuNg:200.0);
((CtSwe:200.0,(((((CtAHr:200.0,CtBJa:200.0):92.0,CtDUw:200.0):48.0,CtBTz:200.0):126.0,
Ct4Bu:200.0):81.0,CtL2b:200.0):135.0):200.0,CmuNg:200.0);
(((((CtL2b:200.0,Ct4Bu:200.0):125.0,((CtAHr:200.0,CtSwe:200.0):85.0,CtBTz:200.0):92.0):107.0,
CtDUw:200.0):173.0,CtBJa:200.0):200.0,CmuNg:200.0);
((CtSwe:200.0,(((((CtBTz:200.0,Ct4Bu:200.0):106.0,CtDUw:200.0):79.0,CtL2b:200.0):68.0,
CtAHr:200.0):78.0,CtBJa:200.0):128.0):200.0,CmuNg:200.0);
((((((Ct4Bu:200.0,(CtBTz:200.0,CtSwe:200.0):113.0):85.0,CtL2b:200.0):75.0,CtAHr:200.0):92.0,
CtBJa:200.0):140.0,CtDUw:200.0):200.0,CmuNg:200.0);
File2
10
100
101
102
103
104
105
106
107
108
For File 1 what i need is; each line should be separated by a ';'. But the file I have (file 1), it is split into 2 lines. What I want is, make them one line so that every line ends with ';'. Its like make every 2 lines in the current format to one line and each have the ';' at the end position.
Once I have file 1 in the right format, I need to merge file 2 with file 1 in the same order separated by a tab. Like this:
1st line of file 2 tab 1st newly format line of file 1
2st line of file 2 tab 2st newly format line of file 1
3st line of file 2 tab 3st newly format line of file 1
4st line of file 2 tab 4st newly format line of file 1
5st line of file 2 tab 5st newly format line of file 1
6st line of file 2 tab 6st newly format line of file 1
Please let me know the best way to do this formating using unix or awk.
LA
---------- Post updated at 06:29 PM ---------- Previous update was at 06:25 PM ----------
Like wise I have 1000's of lines in each file
LA