I am trying to add count values from two different files into one file. Could any body please suggest me best command to do this? My problem was as follows:
a.txt b.txt c.txt
10 20 30(needed)
i tried cat a.txt b.txt > c.txt (its not adding the values)
Don't misunderstand about "Counts", actually i have two flat files which contains only one numeric values, i want to add both the values and store the results into third file.
Your code is working. Can you please suggest me how to change the existing script to dynamic script with parameters, such that it take three file names as 3 parameters and add the content of first two files and insert the sum value into third file? Your help will be appreciated.
script(file1name, file2name, file3name)
{
body of script
file 3 should contain sum of file1 content and file2.