[ale] simple math in bash
    Chris Hamilton 
    chrish at ifsintl.com
       
    Mon Nov 17 18:16:14 EST 1997
    
    
  
> > I can't remember how to do simple math in bash.  I used to know but I cant find
> 
> 	Don't know whether there is an easier way, but, I have always 
> used "dc" to do math in shell scripts. Ex, adding 1 + 1 would be:
> 
> echo "1 1 + p q" | dc
I either use bc (interactively) or expr.
	E.g. $ expr 1 + 1
Spang!
---
Christopher Hamilton            Internal System Administrator
chrish at ifsintl.com              IFS International, Inc.
    
    
More information about the Ale
mailing list