Just for fun, there is a gnuplot-only and platform-independent solution.
For sure, the command plot '< paste a.dat b.dat' using 1:($2/$4)'
from Christoph's answer is unbeatable short (and certainly efficient) in case you are working under Linux or installed the CoreUtils from GnuWin under Windows.
The solution below takes the detour via two long strings. This should work fine unless there is a length limit of strings in gnuplot. I tested only until 100'000 data lines, which will take quite a few minutes. The assumption is that the two files have equal lines with identical x-values. For gnuplot>=5.0 you could write into a datablock instead of a file on disk and do further optimizations.
Script: (works with gnuplot>=4.6.0, March 2012)
### get ratio of numbers from different files
reset
FILE1 = "SO20069641a.dat"
FILE2 = "SO20069641b.dat"
FILE = "SO20069641.dat"
# create some random test data
set samples 100
set table FILE1
plot '+' u (int($0+1)*100):(int(rand(0)*100)+1)
set table FILE2
plot '+' u (int($0+1)*100):(int(rand(0)*100)+1)
unset table
a = ''
b = ''
stats FILE1 u (a=a.' '.strcol(1).' '.strcol(2)) nooutput
stats FILE2 u (b=b.' '.strcol(1).' '.strcol(2)) nooutput
set table "SO20069641.dat"
set samples words(a)/2
splot '+' u (n=2*(int($0+1)),real(word(a,n-1))):(real(word(a,n))):(real(word(b,n)))
unset table
plot FILE u 1:($2/$3) w impulses
### end of script
Result:
zip
ing 2 file objects. – Vaticide