To be more specific on the path for instance i have file as below;
file.txt
apple;10; tomato;5; apple;5; banana;10; banana;5; tomato;10; banana;10; apple;5;
I want to sum numbers by item using bash as a result ;
file.output
apple;20; banana;25; tomato;15;
Another word is i need to simplify the file. How can achieve this kind of output as a separate file in bash ?
Thanks in advance.