read $num while ["$num" < one "q" ) total=`expr $total + $num num=`$num + 1` done echo "The total is $total"