You can also use bc

#!/bin/sh
var1=5
var2=6

echo "$var1 + $var2" | bc
# end

Have fun,
--
Rick L. Mantooth
[EMAIL PROTECTED]
As I said before, I never repeat myself!

On Thu, 27 Jan 2000, Jeff Smelser wrote:

=> Just trying to write a bash script and can't seem to figure out how to
=> do addition with variables. If someone could give me a quick example, I
=> would appreciate it. Thanks
=> 
=> 
=> -- 
=> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
=> as the Subject.
=> 
=> 


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to