rectified mathematical expresion in shell script