I am beginer in programing, I would like to compare column and instead of it, give "if statement" and produce second file.
File 1
5 A B
20 C D
file 2 :
6 1 1
22 2 4
and produce file 3 :
6 1 1 A B
22 2 4 C D
file 3 produce according comparison between column 1 at file 1 and 2 , if $1 < 10 , $1 +/- 1 and if $1 > 10, $1 +/- 2 :
6 1 1 A B
22 2 4 C D
Help please
File 1
5 A B
20 C D
file 2 :
6 1 1
22 2 4
and produce file 3 :
6 1 1 A B
22 2 4 C D
file 3 produce according comparison between column 1 at file 1 and 2 , if $1 < 10 , $1 +/- 1 and if $1 > 10, $1 +/- 2 :
6 1 1 A B
22 2 4 C D
Help please