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 402,823 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,993 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: Programming Forums
Views: 542 | Replies: 3
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  

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Shell Scripting Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 11:34 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC