The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



Thread: Simple Script
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-11-2008
yongitz yongitz is offline
Registered User
 

Join Date: Apr 2008
Location: Philippines
Posts: 20
Hi! If you're doing arithmetic expression, you can do it like the examples below:

Code:
A=`expr $M + $R + $T`
or

Code:
A=$((M+R+T))

Last edited by yongitz; 05-11-2008 at 06:04 PM.
Reply With Quote