The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: absolute value
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 08-26-2008
spirtle spirtle is offline
Registered User
  
 

Join Date: Jun 2008
Location: Scotland
Posts: 150
For the absolute value (and one decimal place), you would also use Perl's abs function, e.g.:

Code:
perl -e 'printf "%.1f\n", abs(15232/1024)'