I need a script to edit files. Im going a bit crazy about this already :).
I've got two files:
143956;lorem
143957;ipsum
143958;lala
143959;vuvu
and second
512;143956;15
2156;143957;15
153;143958;4968
2156;143959;486
And what I need is to put those two files together in this way:
512;143956;lorem;15
2156;143957;ipsum;15
153;143958;lala;4968
2156;143959;vuvu;486
That doesn't look that difficult and probably paste would be enough, but theres a catch. There are rows which are only in one of those files but aren't in the other. In such case I need to wait on the line on the second file and still comparing to the first.
Example:
143956;lorem
143957;ipsum
143959;vuvu //here "lulu" is missing, will compare with 3rd line (143958) but the script wont declare this as "not found" but keep on searching till finds 143959 (which is already on 4 in this case).
512;143956;15
2156;143957;15
153;143958;4968
2156;143959;486
The output would look like this then:
512;143956;lorem;15
2156;143957;ipsum;15
2156;143959;vuvu;486
Or better this way
512;143956;lorem;15
2156;143957;ipsum;15
153;143958;*WAS NOT FOUND*;4968
2156;143959;vuvu;486
But I can finish that on my own...
Hope this is understandable. Thanks very much for any help.
bashor could we switch to a proper programming language like python?