The UNIX and Linux Forums
>
Top Forums
>
UNIX for Advanced & Expert Users
sum of more than 1 column
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
:
sum of more than 1 column
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
1
(
permalink
)
05-02-2008
mohan705
Registered User
Join Date: Feb 2007
Posts: 91
sum of more than 1 column
Hi
I want to sum of 3 columns in file.
Example: I want to sum of 3 ,6,8 th columns in file(SUM(3,6,8)).
Using awk can sum of single column
awk '{a+=$3} END {printf ("%f\n",a)' file_name
Thanks inadvance
MR
Remove advertisements
Forum Sponsor
mohan705
View Public Profile
Find all posts by mohan705