I have data that consists of a file1 with two columns and a file2 with one column. I need to apply this computation
for (i = 1; i == NR)
{x = ($1-T1)/Fi; print (x-int(x))}
where $1 is a first column of file1, T1 is a first row of first column of file 1 and Fi is row i in file2.
file1
5 2
56 3
566 2
54 2
file2
1
2
6
8
The computatiou should be
{x = ($1(file1)-5)/1; print (x-int(x))}
--> output1
{x = ($1(file1)-5)/2; print (x-int(x))}
--> output2
{x = ($1(file1)-5)/6; print (x-int(x))}
--> output3
{x = ($1(file1)-5)/8; print (x-int(x))}
--> output4
Desired result are four files with a column of 4 numbers. I mean that only $1 are number that vary during the computation and the other variable are fixed.