in general i will use expr inside shell scripts for doing arithmetic ... Did you tried to read "man ksh" if you're using ksh? "man bash", for example, ...
www.google.com.tw