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
compare 2 files.. amon Shell Programming and Scripting 8 06-23-2008 11:34 AM
Compare files kharen11 UNIX for Advanced & Expert Users 25 03-14-2007 05:35 AM
compare two txt files space13 Shell Programming and Scripting 8 09-22-2006 10:40 AM
compare files and beyond MizzGail UNIX for Dummies Questions & Answers 2 04-25-2003 02:34 PM
compare files ingunix UNIX for Dummies Questions & Answers 3 05-24-2001 12:44 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 03-29-2008
charandevu charandevu is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 29
compare two files

File1
E100 0 5/29/1993 0 E001 E000
E102 0 1/23/1994 0 E001 E003
E104 0 6/4/1994 0 E001 E003
E105 0 7/30/1993 0 E001 E003
E106 0 1/9/1993 0 E001 E003
E108 0 2/3/1995 0 E001 E003
E109 0 2/15/1995 0 E001 E001

File2
E108 0 2/3/1995 0 E001 E003
E109 0 2/15/1995 0 E001 E001
E110 0 2/15/1995 0 E001 E001
E111 0 9/15/1996 0 E001 E001
E112 0 4/21/1997 0 E001 E001



These are the two files
Column 1,2 and 3 are the key fields.
A TO B MAPPING

I need to compare file1 key columns and the file2 key columns. If File1 key column matches with File2 key column move the entire row of file1 which are matching to > File3.

E108 0 2/3/1995 0 E001 E003
E109 0 2/15/1995 0 E001 E001



If the key columns of file1 not matches with file2 then move the entire row of the file1 which are not matching in the file2 > File4.

E100 0 5/29/1993 0 E001 E000
E102 0 1/23/1994 0 E001 E003
E104 0 6/4/1994 0 E001 E003
E105 0 7/30/1993 0 E001 E003
E106 0 1/9/1993 0 E001 E003






///LY

B TO A mapping

To file5 and file6.

Please let me know on this ASAP………

Thanks in advance

CHARAN
 

Bookmarks

Tags
solaris

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 06:03 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