The UNIX and Linux Forums  

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
summing according to the column ramky79 UNIX for Dummies Questions & Answers 2 02-28-2008 04:51 PM
Unix Arithmatic operation issue , datatype issue thambi Shell Programming and Scripting 23 02-19-2008 07:19 AM
Grouping and summing data through unix pcharanraj Shell Programming and Scripting 1 12-14-2007 10:20 AM
Summing on column sbasetty Shell Programming and Scripting 2 02-07-2007 08:15 PM
XML issue anujairaj UNIX for Dummies Questions & Answers 1 05-02-2006 02:40 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 05-05-2008
er_ashu er_ashu is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 50
A summing issue

Hi All,

Here is the problem:

The input file is like as per below. Each record has 30 chars in total. Have to add the first 17 and the next 13 and append the output. Total records can vary.

000000004728800000000000003908
000000003005100000000000002484
000000002602200000000000002151
000000003418400000000000002825
000000001059900000000000000876
000000001146200000000000000947
000000000973700000000000000805
000000001561300000000000001290
000000001088600000000000000900
000000001146200000000000000947
000000001029300000000000000851
000000001034500000000000000855
000000000977700000000000000808
000000000888800000000000000735
000000000884200000000000000731
000000001061100000000000000877
000000002721600000000000002249
000000001040800000000000000860
000000001353100000000000001118
000000001306300000000000001080
000000001088600000000000000900
000000001000400000000000000827
000000001034500000000000000855
000000018798400000000000015536
000000005204400000000000004301
000000002292400000000000001895
000000002865600000000000002368
000000000973700000000000000805
000000001002200000000000000828


Please advise.

Ashu
 

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 10:40 PM.


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