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
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 -->
#
2
(
permalink
)
05-25-2006
ranj@chn
Playing with Ubuntu Now!
Join Date: Oct 2005
Location: Chennai
Posts: 364
man awk
check awk.
Code:
awk '{sum+=$1} END{printf("%d\n",sum)}' filename
Always do a search in the forum. You will find your answer.
ranj@chn
View Public Profile
Find all posts by ranj@chn