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
Duplicate rows in CSV files based on values Incrediblian Shell Programming and Scripting 8 04-26-2009 10:35 PM
perl script to print to values in rows and columns nogu0001 Shell Programming and Scripting 3 02-22-2009 04:30 PM
add new rows in list of files koti_rama Shell Programming and Scripting 1 02-02-2009 08:33 AM
Counting rows in many files DrZoidberg UNIX for Dummies Questions & Answers 7 09-02-2008 09:29 AM
Concatenate rows in to 2 files unxusr123 Shell Programming and Scripting 1 08-01-2008 06:29 AM

 
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-17-2009
jimmy_y jimmy_y is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 94
Lightbulb plus values from two files in differient rows

Hi Guys ,

I have two files.

filea:
12:20:23 4
12:21:23 3
12:22:23 2
12:25:23 3

fileb:
11:20:23 4
12:21:23 3
12:22:23 2
12:26:23 3
12:30:23 3

The result will be:
11:20:23 4
12:20:23 4
12:21:23 6
12:22:23 4
12:25:23 3

it means:
1. if the 1st column same in two files, then plus the value in the 2nd value.
2. the date in fileb if greater than the last line in filea, then ignore.

Thanks
 

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 02:44 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