[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Command-line-interface (CLI) calculator to work out the difference between 2 dates



> Arithmetic Expansion
>   Arithmetic expansion allows the evaluation 
>   of an arithmetic expression and the substitution 
>   of  the  result.   
>
> The format for arithmetic expansion is:
>
>   $((expression))
>
> The old format  $[expression]  is deprecated 
> and will be removed in  upcoming versions of bash.

  Thanks for bringing the syntax for the evaluation 
  of arithmetic expressions in bash to my attention ....

    echo '    '  $[ (16/2 + 6) * 3 ]
 
  Previously, I had totally missed it .... :-)


-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona


Reply to: