![]() |
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 |
| matching 2 exact fields | aismann | Shell Programming and Scripting | 2 | 11-14-2008 03:16 AM |
| sum of all matching rows using awk | i.scientist | UNIX for Dummies Questions & Answers | 8 | 08-06-2008 08:13 PM |
| combining fields in two text fields | shocker | Shell Programming and Scripting | 3 | 01-16-2008 11:27 AM |
| Extract duplicate fields in rows | anhtt | Shell Programming and Scripting | 6 | 12-02-2007 09:58 PM |
| Grep Line with Matching Fields | hemangjani | UNIX for Advanced & Expert Users | 13 | 08-10-2007 11:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi All,
I was seaching for script for solaris 5.10 environmet to get a output file from Input file like this. INPUT FILE---------------- 1000KE,MINE,74748 1000KE,YOUR,123998 200KE,MINE,886049 50KE,MINE,474176 50KE,YOUR,379998 100KE,YOUR,999994 50KE,MINE,9601 50KE,YOUR,990393 1000KE,MINE,499997 100KE,YOUR,499998 100KE,MINE,999996 And OUTPUT FILE----------------- 1000KE,MINE,(74748+499997) 1000KE,YOUR,74748 200KE,MINE,886049 50KE,MINE,(474176+9601) 50KE,YOUR,(379998+990393) 100KE,YOUR,(999994+499998) 100KE,MINE,999996 LOGIC: Add third field ($3)of all rows and make it single row if 1st and 2nd Field are matching./OR/ Find & match 1st and 2nd filed and merge them with making sum of third field. Thanks In Advance Ashis |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|