ok im using aix unix v4
im having bit of a problem. when i run the code it goes over fine but when it come to the math it just sux.... it doubles the price after you put the code in. can anyne help me thanx...
Code:
#! /bin/ksh
# +--------------------+
# | BOBBY D ESTRADA |
# +--------------------+
print -n "\n Please Enter Price: "
read price
print -n "\n Please Enter Coupon Code: "
read code
case $code in
H|h)
total=`print "scale=3; $price / .50"|bc`
;;
F|f)
total=`print "scale=3; $price / .40"|bc`
;;
T|t)
total=`print "scale=3; $price / .33"|bc`
;;
Q|q)
total=`print "scale=3; $price / .25"|bc`
;;
*)
print "\nNO DISCOUNT"
total=$price
;;
esac
print "\nPrice: $price\nCode: $code\nTotal:$total "
thanx in advance