Hello all.. i am new to shell scripting.. learning the things..i am struck at a place here..
I have divided one table in two two tables for comparision..
Query Type Start Stop
X1 Left 1000 1025
X1 Left 2000 2025
X1 Left 10000 10025
X2 Left 1050 1075
X2 Left 3050 3075
X3 Left 9000 9025
Y1 Left 3000 3025
Y1 Left 4500 4525
Y2 Left 7000 7025
Y2 Left 8200 8225
Y2 Left 2000 2025
Q2 T2 start2 stop2
X1 Right 1050 1075
X1 Right 3000 3025
X1 Right 20000 20025
X2 Right 2050 2075
X2 Right 7050 7075
X3 Right 9050 9075
Y1 Right 4000 4025
Y1 Right 5500 5525
Y2 Right 7700 7725
Y2 Right 9200 9225
Y2 Right 14000 14025
Now I want to compare all X1's in first table with X1's in second table, X2's with X2's like that and Subtract first table stop column from second table and Out of all combinations display results of pairs which have difference less than 3000
Query Type Start Stop Q2 T2 start2 stop2 Difference
X1 Left 1000 1025 X1 Right 1050 1075 50
X1 Left 1000 1025 X1 Right 3000 3025 2000
X1 Left 2000 2025 X1 Right 3000 3025 1000
X2 Left 1050 1075 X2 Right 2050 2075 1000
X2 Left 3050 3075 X2 Right 2050 2075 2000
X3 Left 9000 9025 X3 Right 9050 9075 50
Y1 Left 3000 3025 Y1 Right 4000 4025 1000
Y1 Left 3000 3025 Y1 Right 5500 5525 2500
Y1 Left 4500 4525 Y1 Right 4000 4025 500
Y1 Left 4500 4525 Y1 Right 5500 5525 1000
Y2 Left 7000 7025 Y2 Right 7700 7725 700
Y2 Left 8200 8225 Y2 Right 9200 9225 1000
Y2 Left 7000 7025 Y2 Right 9200 9225 2200
Y2 Left 8200 8225 Y2 Right 7700 7725 500
actually it is.. i generalized it.. i wanted to compare the sequences for primers here..
Thank you for help.. i am working on it now
If the input always have identical number of lines and in the same order, "paste" is the right tool.