See: http://tldp.org/LDP/abs/html/arithexp.html
ThisMacUsage=$(($ThisMacUsage+(($IPMax-$IPMin))));
Don Gould wrote:
ThisMacUsage=($ThisMacUsage+($IPMax-$IPMin));
returns...
./CheckDLimit.sh: line 47: syntax error near unexpected token `('
./CheckDLimit.sh: line 47: ` ThisMacUsage=($ThisMacUsage+($IPMax-$IPMin));'
I guess this is not how you're meant to add up values in a sh?
Cheers Don
--
Don Gould
www.thinkdesignprint.co.nz - www.tcn.bowenvale.co.nz -
www.bowenvale.co.nz - www.hearingbooks.co.nz - www.buxtonsquare.co.nz -
skype:ThinkDesignPrint?add - Good ideas: www.solarking.co.nz