hi i have file 1 as follows:
6
7
8
9
10
i have file 2 as follows:
5
5
5
5
5
[/code]
i want file 3 as follows:
-1
-2
-3
-4
-5
i am subtracting every row from one file from every row from the second file and saving it to another file..i would like to use awk to do this..
so far i have:
awk '{for(i=1; i<=NF; i++) {val=$1} {printf("%1.11f",val)}}' col > try #file1
awk '{for(i=1; i<=NF; i++) {val=$1} {printf("%1.11f",val)}}' col1 > try1 #file2
since awk loses the variable from one statement to another, is there any way i can combine the two statements together and perform the subtraction?
thanks in advance.