I have a few .txt files (in the same directory) that look like this:
123 carrot 50 apple 13 tomato 5 potato 2 pear
100 carrot 10 apple 3 tomato 2 potato
I need to merge them into one sorted list. So if I only had two lists above, I'd get
223 carrot 60 apple 16 tomato 7 potato 2 pear
Is there an easy way to do this with shell commands, or should I start writing code?