The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Converting Binary decimal coded values to Ascii Values gaur.deepti UNIX for Advanced & Expert Users 3 04-02-2008 12:33 PM
Unix Arithmatic operation issue , datatype issue thambi Shell Programming and Scripting 23 02-19-2008 07:19 AM
max values amd min values devmiral Shell Programming and Scripting 12 04-19-2007 10:42 AM
xor 2 values in ksh? DukeNuke2 Shell Programming and Scripting 5 11-08-2006 12:38 PM
Reg DB values mpkirankumar UNIX for Advanced & Expert Users 2 06-28-2006 01:57 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-06-2009
bobprabhu bobprabhu is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 34
Issue on Suming up the values in awk

Hi

I have a data file like a.dat

item_no Item_id qty_ordered qty_delivered
123 axxx 1 1
456 axxx 2 2
899 axxx 2 2
789 bxxx 1 1
101 bxxx 2 2
111 bxxx 2 2


I want to split these single file in 2 file for the 2 different item_id like and get the totals of qty_order and qty_delivered.

item_no Item_id qty_ordered qty_delivered
123 axxx 1 1
456 axxx 2 2
899 axxx 2 2
--------------------------------------
total5 5 5

I tried to fetch those information in Spool file from data base and
put a grep -i "axxx" > c.dat
grep -i "bxxx" > d.dat

But i write a awk scrip to sum up and tried get the expected result...but am not able to..
Please suggest me some idea's to solve this.
Thanks in Advance!!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:07 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0