On Thu, 18 Feb 2010, jida...@jidanni.org wrote:

> >>>>> "CFAJ" == Chris F A Johnson <ch...@cfajohnson.com> writes:
> CFAJ> On Thu, 18 Feb 2010, jida...@jidanni.org wrote:
> 
> >> $ expr 3.1 + 3
> >> expr: non-numeric argument <---say "non integer argument"
> >> $ expr 3.1 + 3b
> >> expr: non-numeric argument
> 
> CFAJ>    The expr command's arithmetic only works with integers.
> Yes
> CFAJ>    3.1 is not an integer, nor is 3b.
> Yes
> CFAJ>    To do calculations with decimal fractions, I recommend awk.
> Yes.
> 3,1 is numeric!
   But it is NOT an integer, and expr only handles integers. 

-- 
   Chris F.A. Johnson                          <http://cfajohnson.com>
   ===================================================================
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)


Reply via email to