Link to home
Start Free TrialLog in
Avatar of Tek Info
Tek Info

asked on

Total values and place the total in the text file

C:\Folder\Output.txt

The text always has values next to the group of words below.  (Some numberic values have been entered to show an example:

Total Stnd PU: 19
Total C PU: 12
Total Extra Stnd PU: 2
Total Extra C PU: 2
Total P:


I would like to run a script against this Output.txt so that the script looks far numeric values at the end of each of:

Total Stnd PU:

Total C PU:

Total Extra Stnd:

Total Extra C Pu:

I would like the script to look to the right of these words and add all the values and then put the value after the words:

Total P:  

So after the script runs, the file should be resaved and it should look like this;


Total Stnd PU: 19
Total C PU: 12
Total Extra Stnd PU: 2
Total Extra C PU: 2
Total P: 35

Thanks in advance for your assistance.
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial