User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 391,596 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,699 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser:

Simple awk help

Join Date: Apr 2008
Posts: 2
Reputation: manuswami is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
manuswami manuswami is offline Offline
Newbie Poster

Simple awk help

  #1  
May 2nd, 2008
Hi,

I have this belowmentioned file:

col1 col2
10 50
20 60
30 70
40 80

I have to take the O/P as

col1 col2 col3
10 50 60
20 60 80
30 70 100
40 80 120

Using awk how can i get the above output as the col3 is the sum of col1 and col2.

Thanks in advance.
Mike
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 11:42 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC