Try some thing like this


#! /bin/sh
# addnums - adds two numbers input as args and outputs the result
newval=`expr $1 + $2`
echo 'the sum of ' $1 ' and ' $2 ' is ' $newval 


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.
begin:vcard 
n:Hughes;Bret 
tel;fax:918.587.0131
tel;work:918.587.0131
x-mozilla-html:FALSE
url:www.elevating.com
org:Elevating Communications Inc
adr:;;PO Box 1323;Tulsa;OK;74101-1323;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Chief Solutionist/President
x-mozilla-cpt:;19888
fn:Bret  Hughes
end:vcard

Reply via email to