<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Adding the field in 3 files in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/adding-the-field-in-3-files/m-p/4044026#M64671</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# awk '{H[$1]+=$2;S[$1]+=$3};END{for (name in H) print name, H[name], S[name]}' file1 file2 file3 &amp;gt; fileout&lt;BR /&gt;&lt;BR /&gt;Any number of file arguments can be passed.  It doesn't matter if a name fails to appear in any file, either.&lt;BR /&gt;&lt;BR /&gt;I see that you are new to the Forums.  Welcome!  Please see:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#28" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#28&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Wed, 25 Jul 2007 12:51:11 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2007-07-25T12:51:11Z</dc:date>
    <item>
      <title>Adding the field in 3 files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/adding-the-field-in-3-files/m-p/4044024#M64669</link>
      <description>I have 3 files these files contains the exactly column like this :&lt;BR /&gt;&lt;BR /&gt;*******************************************&lt;BR /&gt;* Name H Fee(1st yr) Scholarship(1styr)   *&lt;BR /&gt;*******************************************&lt;BR /&gt;Steave    :7000                    :5000&lt;BR /&gt;Mike      :5000                    :2000&lt;BR /&gt;Jhon      :7000      :3000&lt;BR /&gt;and so on&lt;BR /&gt;&lt;BR /&gt;I have simillar 2 more files which have the same columns but for 2nd year and 3rd year in 2nd and 3rd file respectively.&lt;BR /&gt;&lt;BR /&gt;I want a single file which will be containing the name of the candidate ,sum of hostel fee for 3 years, sum of scholarship for three years.&lt;BR /&gt;&lt;BR /&gt;Assuming:&lt;BR /&gt;The same names are appering in the 2nd and 3rd file with same order.</description>
      <pubDate>Wed, 25 Jul 2007 12:00:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/adding-the-field-in-3-files/m-p/4044024#M64669</guid>
      <dc:creator>Ankush_Me_1</dc:creator>
      <dc:date>2007-07-25T12:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Adding the field in 3 files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/adding-the-field-in-3-files/m-p/4044025#M64670</link>
      <description>Can any one reply mw.&lt;BR /&gt;How we can add up the colums of 2nd year and 3rd year to first year.&lt;BR /&gt;Using awk.I am try to write a shell script for that.</description>
      <pubDate>Wed, 25 Jul 2007 12:28:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/adding-the-field-in-3-files/m-p/4044025#M64670</guid>
      <dc:creator>Ankush_Me_1</dc:creator>
      <dc:date>2007-07-25T12:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Adding the field in 3 files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/adding-the-field-in-3-files/m-p/4044026#M64671</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# awk '{H[$1]+=$2;S[$1]+=$3};END{for (name in H) print name, H[name], S[name]}' file1 file2 file3 &amp;gt; fileout&lt;BR /&gt;&lt;BR /&gt;Any number of file arguments can be passed.  It doesn't matter if a name fails to appear in any file, either.&lt;BR /&gt;&lt;BR /&gt;I see that you are new to the Forums.  Welcome!  Please see:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#28" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#28&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 25 Jul 2007 12:51:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/adding-the-field-in-3-files/m-p/4044026#M64671</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-07-25T12:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Adding the field in 3 files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/adding-the-field-in-3-files/m-p/4044027#M64672</link>
      <description>Thanks a lot boss!&lt;BR /&gt;yeah i m new to this form.&lt;BR /&gt;&lt;BR /&gt;I have customize it with accordance to my need.&lt;BR /&gt;But u have given a wonderful approach.&lt;BR /&gt;&lt;BR /&gt;ll approach u if i ll not be able to solve any problem my self.&lt;BR /&gt;&lt;BR /&gt;Thanks once again.&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Jul 2007 14:00:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/adding-the-field-in-3-files/m-p/4044027#M64672</guid>
      <dc:creator>Ankush_Me_1</dc:creator>
      <dc:date>2007-07-25T14:00:50Z</dc:date>
    </item>
  </channel>
</rss>

