![]() |
|
|
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 |
| select values based on keys | repinementer | Shell Programming and Scripting | 3 | 08-06-2009 06:12 AM |
| To Delete the repeated occurances and print in same line by appending values | shaliniyadav | Shell Programming and Scripting | 8 | 06-26-2009 02:27 AM |
| How to print Dissimilar keys and their values? | repinementer | Shell Programming and Scripting | 4 | 05-28-2009 12:45 PM |
| Extract multiple repeated data from a text file | apjneeraj | Shell Programming and Scripting | 5 | 04-14-2009 03:40 AM |
| comparing the columns in two files | bab123 | Shell Programming and Scripting | 1 | 07-28-2008 03:48 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
comparing the values of repeated keys in multiple columns
Hi Guyz
The 1st column of the input file has repeated keys like x,y and z. The ist task is if the 1st column has unique key (say x) and then need to consider 4th column, if it is + symbol then subtract 2nd column value with 3rd column value (we will get 2(10-8)) or if it is - symbol subtract 3rd column value with 2nd(we ll get 4 (14-10)) after that output the line with low value(2) i.e. x 10 8 + and the same follows to y and z.....etc. Thnx input Code:
x 10 8 + x 10 14 - y 10 8 + y 10 11 - z 10 8 + Code:
x 10 8 + y 10 11 - z 10 8 + |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|