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
How to compare two columns in two files? sncoupons Shell Programming and Scripting 17 10-09-2009 08:46 AM
compare columns from 2 files and merge samwilkinson UNIX for Dummies Questions & Answers 2 08-25-2009 01:58 PM
compare files by lines and columns giviut Shell Programming and Scripting 4 01-17-2008 06:00 AM
Compare two files and merge columns in a third CM64 Shell Programming and Scripting 20 04-04-2007 02:41 PM
Compare multiple columns between 2 files stevesmith Shell Programming and Scripting 15 09-20-2006 01:04 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 09-27-2009
manish44 manish44 is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 3
Compare few columns from two files

My Friends,
Need your help to find the difference between few columns from two comma delimited files. For example, File1 and File2 has 22 columns, and I want to find the difference in first 12 columns.

I have list of file names in MyListOfFiles2Compare.txt. Data is separated with commas. These are .csv and some .txt files. Most files comma delimited. Some .txt files are tab delimited.

From the list of file names in MyListOfFiles2Compare.txt, take the file from
dir1/files and dir2/files and compare the specific number of columns and if any data/column mismatch , need to write the mismatch data in another file called mismatch.csv. When we write the difference to mismatch.csv, write the name of the file which has difference, column number, data from first file and 2nd file. Since I have to compare thousands of files, I need to go back and see which file has mismatch and mismatch data/column.
======= Thank you for giving your input on this =============
~~Manish
 

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 05:53 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