![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| comparing files - adding/subtracting/formating columns | oabdalla | Shell Programming and Scripting | 7 | 06-13-2008 04:20 AM |
| Comparing similar columns in two different files | ragavhere | Shell Programming and Scripting | 13 | 04-16-2008 09:53 AM |
| comparing and inserting common line in other file | namishtiwari | Shell Programming and Scripting | 2 | 03-25-2008 08:09 AM |
| Comparing Columns of two FIles | ggopal | Shell Programming and Scripting | 4 | 02-21-2007 08:06 PM |
| Comparing Columns of two FIles | ggopal | UNIX for Advanced & Expert Users | 1 | 02-17-2007 04:11 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi,
I have two text files.The first and the 2nd file have data in the same format For e.g. The first file has BOOKS COUNT: 40 BOOKS AUTHOR1 SUM:1018 MAX:47 MIN:1 AVG:25.45 BOOKS AUTHOR3 SUM:181 MAX:48 MIN:3 AVG:18.1 Note:Read it as Table columnname sum(column) max(column) min(column) File2 contains BOOKS COUNT: 40 BOOKS AUTHOR1 SUM:1018 MAX:45 MIN:2 AVG:23.55 BOOKS AUTHOR2 SUM:561 MAX:49 MIN:1 AVG:21.5769231 BOOKS AUTHOR3 SUM:181 MAX:48 MIN:3 AVG:18.1 The file 2 contains the additional column named AUTHOR2. Comparison should be such that the column AUTHOR1 in file 1 is compared with the column AUTHOR1 in file 2. Here The values of column AUTHOR1 in the table BOOKS mismatches with the other file. I should write a script to compare the columns of the table as said and report the mismatches to a different file and also report the additioanl columns present in the 2nd file. The output should be in this format. Column AUTHOR1 in the tabloe BOOKS mismatches. BOOKS AUTHOR1 SUM:1018 MAX:47 MIN:1 AVG:25.45 BOOKS AUTHOR1 SUM:1018 MAX:45 MIN:2 AVG:23.55 Column AUTHOR2 is additional. I am new to unix.Please help me in writing a script to do this job. Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|