If the 1th column of file f1 and file f2 is the same, then export those line with maximum string of 2nd column
please help to write a awk command-line programs to achieve the following functions: Thank in advance.
requeset Description: compare two files f1 and f2, export to file f3: 1 Delete duplicate rows of in file f1 and file f2 2 If the 1th column of file f1 and file f2 is the same, then export those line with maximum string of 2nd column. for example: Code:
0.1-37 < 0.2-53; > num of 0-9 consecutive occurrences may be different, such as 9.13.2 vs 11.5.6, D15 vs F4 > The type, order, num of other characters (such as '.' '_' '-' 'A-Z' 'a-Z') except 0-9 is the same. like 6.1.4-b.0 vs 6.1.5-c.2, 1.b5_a vs 1.b12_d, D15 vs F4 .... > if find the 1st large string after comparison, then stop comparing the 2nd column, and output this line of those file, such as 'IO 1.b5_a' of f1, 'IO 1.b12_d' of f2, will output 'IO 1.b12_d' 4 cat f1: Code:
PK 0.1-37 Code:
Uni 8c-7 Code:
Art 6.1.5-c.2 |
Quote:
Have you tried to solve this yourself? Have you read the LQ Rules? Are you aware of the rule which cites: Quote:
If your answer is you're completely stuck, then how did you get to this point where you are trying to solve this problem, without proper background? |
All times are GMT -5. The time now is 02:53 PM. |