I am writing a script that's picking up two values from a file and then subtracting them.But I am unable to do substraction as it is throwing error.
   res1=  awk 'FNR == '${num1}' {print $1}' /home/shell/test.txt
   res2=  awk 'FNR == '${num2}' {print $1}' /home/shell/test.txt
   res= $((res2 - res1))
   echo $res
I also tried expr = `expr $res2 -$res1`  but it didn't work. please help me so as to get the desired result. 
 
     
     
    