I have two files,
>cat foo.txt
QGP 1044
TGP 634
KGP 616
DGA 504
PGP 481
KGD 465
QGE 456
TGD 393
DGS 367
TGA 366
>cat bar.txt
QGP 748.6421
TGP 564.0048
KGP 568.7543
DGA 193.6391
PGP 405.1929
KGD 248.7047
QGE 287.7652
TGD 246.6278
DGS 143.6255
TGA 210.1166
Column 1 is identical in both files. I need to do a mathematical operation like so,
(foo.txt$column2 - bar.txt$column2)/sqrt(bar.txt$column2)
and output column1 and the math-operated column2. I can't figure out how to iterate over each row using awk. Really appreciate any help!