|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Homework & Coursework Questions Students must use and complete the template provided. If you don't, your post may be deleted! Special homework rules apply here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Script to find difference between 2 files by column
Hi , i am newbie to shell scripting and am trying to do the below job,
A shell script to be run with a command like sh Compare.ksh file1.txt file2.txt 1 2 > file3.txt 1 2-are the key columns Consider the delimiter would be Tab or comma File 1: SK TEST NAME MATHS PHYSICS 21 1 AAA 45 65 21 2 AAA 48 66 22 1 BBB 46 64 22 2 BBB 47 65 23 1 CCC 58 85 23 2 CCC 59 88 File 2: SK TEST NAME MATHS PHYSICS 21 1 AAA 45 65 21 2 AAA 48 66 22 1 BBB 46 6 22 2 BBB 47 65 23 1 CCC 58 85 23 2 CC 59 88 And return result like, File 3: FILE SK TEST NAME PHYSICS file1.txt 22 1 BBB 64 file2.txt 22 1 BBB 6 file1.txt 23 2 CCC file2.txt 23 2 CC Any expert help for this student? ![]() |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.
Please review the rules, which you agreed to when you registered, if you have not already done so. More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on. If you did post homework in the main forums, please review the guidelines for posting homework and repost. Thank You. The UNIX and Linux Forums. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script to find difference between 2 files by column | shakthi666 | Shell Programming and Scripting | 1 | 01-09-2013 02:03 AM |
| script to find whether the difference between two files in only additions but not modifications | under_cons | Shell Programming and Scripting | 1 | 10-17-2012 02:43 PM |
| to find difference between two files | ganesh_248 | Emergency UNIX and Linux Support !! Help Me!! | 6 | 10-01-2009 12:19 AM |
| find difference in file column... | malcomex999 | Shell Programming and Scripting | 1 | 04-15-2009 05:31 AM |
| script to compare first column of two files and find difference | adityam | Shell Programming and Scripting | 3 | 10-22-2008 09:02 AM |
|
|