Hi thanks,
But my question is not like sorting.
I am explaining little detaily:
FIle 1:
123 678 345 hi 6798
452 789 256 bi 8746
145 689 124 ji 435
456 690 345 ki 789
File 2:
345
256
124
Expected Output:
The outfile should rearrange according to the fourth column of file1, matching with the first column of file2.
Like:
123 678
345 hi 6798
456 690
345 ki 789
452 789
256 bi 8746
145 689
124 ji 435
Then the column 5 should be added for 345 matching individuallly, 256 invidually, 124 individually.
Like:
the addition of 345 match 5th column is 6798+789 = 7587
the addition of 256 macth 5th column is 8746
the addition of 124 match 5th column is 435
Thanks in advance for your reply,
Vasanth
Quote:
Originally Posted by era
If the number is always in the fourth column and
all you need is to sort numerically, you don't need Perl at all.
What's with the poll?
|