Hi,
I have a merged and sorted file like this:
file1
coord pos neg
100 0 0.1
106 0.3 0.4
109 0 0.1
coord pos neg
99 0 0.5
100 0.2 0
105 0 0.1
109 0.3 0.2

I have make a file like:
file_out
coord pos neg
99 0 0.5
100 0.2 0.1
105 0 0.1
106 0.3 0.4
109 0.3 0.3


Basically, I want to search for a "coord" within the file and add the second and third column values , print them only once.

Any help is appreciated. I am familiar with Perl, BASH scripting. I prefer to write this perl, please help me.