![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Comparing two files | superstar003 | Forum Support Area for Unregistered Users & Account Problems | 1 | 05-08-2008 03:34 AM |
| Comparing two files.. | padarthy | Shell Programming and Scripting | 1 | 08-29-2007 08:01 AM |
| comparing two files | marwan | UNIX for Dummies Questions & Answers | 6 | 06-11-2007 02:39 AM |
| comparing shadow files with real files | terrym | UNIX for Advanced & Expert Users | 4 | 02-09-2007 02:38 AM |
| File size exceeding 2GB | Nadeem Mistry | UNIX for Dummies Questions & Answers | 3 | 07-30-2001 06:53 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Comparing files exceeding 1.7GB
HI,
I have few files in two folders with the same name exceeding 2GB.I need to compare these files. These files are in the format File1 in first folder 1|20080430|IA001|TREND DYNAMICS INC 2|20080430|IP001|AMERITAS LIFE INSURANCE CO 3|20080430|IP002|TRANSAMERICA LIFE INSURANCE CO File1 in second folder 1|20080430|IA45|TREND DYNAMICS INC 2|20080430|IP001|AMERITAS LIFE INSURANCE CO The files may be pipe or tab separated. What i need to do here is to sort both the files, then compare. But the problem here is since the file exceeds 2GB sort command wont work and the diff command wont work. The comparison has to be line by line and field to field. The output should be in this format For lines from files in first folder i need to indicate it by appending "From Test1" to the beginning of mismatching line like this From Test1 - 1|20080430|IA001|TREND DYNAMICS INC For lines from files in second folder i need to indicate it by appending "From Test2" to the beginning of mismatching line like this From Test2 - 1|20080430|IA45|TREND DYNAMICS INC And if a line found in file 1 of first folder is not found in file 1 of second folder then print that line alone to my output file Hence my Final output should be like From Test1 - 1|20080430|IA001|TREND DYNAMICS INC From Test2 - 1|20080430|IA45|TREND DYNAMICS INC From Test1 - 3|20080430|IP002|TRANSAMERICA LIFE INSURANCE CO Is there a way to do it? Last edited by ragavhere; 06-05-2008 at 04:18 PM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|