I have afile containing 2 colums I want to minus 2 colums and then dividing the output on 16000 and put the result in anew file | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I have afile containing 2 colums I want to minus 2 colums and then dividing the output on 16000 and put the result in anew file

25th Jan 2017, 9:36 AM
Doaa Mohamed
Doaa Mohamed - avatar
1 Answer
0
~/temp$ cat testfile 53000 5 20000 1 71230 2 83431 4 12561 5 ~/temp$ awk '{ $3=($1-$2)/16000; print $3}' testfile 3.31219 1.24994 4.45175 5.21419 0.78475 ~/temp$
25th Jan 2017, 9:48 AM
bem
bem - avatar