[HPADM] Getting an absolute value

From: Shaw, Marco (Marco.Shaw@aliant.ca)
Date: Thu Oct 12 2006 - 10:38:07 EDT


Can't believe google doesn't provide an answer, searched these archives
also!

#a=`expr 2 - 1`
#echo $a
1
#a=`expr 2 - 3`
#echo $a
-1

I want to get the absolute value of the difference. I don't have to use
expr, but
also would prefer something available directly with the Borne shell.

Marco

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:54 EDT