![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| compare 2 files.. | amon | Shell Programming and Scripting | 8 | 1 Week Ago 07:34 AM |
| compare two files | charandevu | Shell Programming and Scripting | 7 | 03-30-2008 12:20 PM |
| compare two txt files | space13 | Shell Programming and Scripting | 8 | 09-22-2006 06:40 AM |
| compare files and beyond | MizzGail | UNIX for Dummies Questions & Answers | 2 | 04-25-2003 10:34 AM |
| compare files | ingunix | UNIX for Dummies Questions & Answers | 3 | 05-24-2001 08:44 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Compare files
Hi Masters! I know this problem is quite difficult.
I have two files that looked like this: File1 mary a b d anne d e jane g h sam a File2 role1 a d c d role2 e f g h role3 a b d role4 a d e role5 g h It will first look into file1 then compare to all entries in file2 regardless of arrangement. The output should be: mary role1 role3 anne role 4 jane role2 role5 sam role1 role3 role4 I've tried some other way to do this but unsuccessful. Can it be done in UNIX? Please help. Thanks! |
| Forum Sponsor | ||
|
|
|
|||
|
It's not a homework. Actually I tried using excel to manipulate the files but I'm not familiar with macros so I hope someone can help me do it in UNIX.
This will be a repeated process for me and having a right code will really help me a lot. Unfortunately my limited knowledge in UNIX wont help me too. |
|
|||
|
The files on file1 can go over several rows and columns as well as for file2. For example, mary has a, b and d. It will then search the file2 that contains a, b and d (it should be all not any) which in this case role1 and role3. Then it will begin searching for second entry in file1 who is anne, and so on.
|
|||
| Google UNIX.COM |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|