I got a txt format like below, each user(a,b,c…) has a numeric value
old values file
a,1000130103828
b,9230032882842
c,98247249242402
...
and new values file
a,20200203020
b,1029328428429
c,102492290011
...
How can I easily calc a new file by sum each user’s value in Bash?
call awk?
output
Its likely that with more than 3 users, the output will not be sorted as it is in your file, if you need sorting, add
to the above.
IHTH.