The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
adding contents of file
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Forum Rules
FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
adding contents of file
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
10-20-2006
anbu23
Registered User
Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,397
Code:
awk '{sum+=$1} END{printf("%
f
\n",sum)}' filename
anbu23
View Public Profile
Find all posts by anbu23