[HPADM] awk question

From: Buddy Mills (ramill@wm.edu)
Date: Tue Dec 02 2003 - 08:57:54 EST


Hello to all,
  I've got a awk statement and can't figure out how to return the ending zeros(0's). Example, if the total amount comes to 34.40 the return value is 34.4. How can I make it keep the zero?

amount=`awk -f awk.one {file of numbers}`

The following is "awk.one" program

{ total += $1
}
END { print total }

Thanks

Buddy Mills
The College of William and Mary
ramill@wm.edu

--
             ---> 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:37 EDT