The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
How to merge and add?? Two Files
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
How to merge and add?? Two Files
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
08-29-2008
danmero
丹
Join Date: Nov 2007
Location: 45.48-73.63
Posts: 1,441
What about..
Code:
awk '{a[$1]+=$2}END{for(i in a) print i, a[i]}' file1 file2 file3 .... fileX > output_file
danmero
View Public Profile
Find all posts by danmero
Find danmero's past nominations received
Find danmero's present nominations given