How to manipulate a contents of file as record structures

C

CK Raju

I have a text file containing the following alphanumerals.
aaaaaa22bbbbbbbb55
hhhhhh11dpdpdpdp22
kkkkkkk21lokolkolko33
......

I need to read the contents as single line, one after the other
and append the sum of digits at the end.
aaaaaa22bbbbbbbb5577
hhhhhh11dpdpdpdp2233
kkkkkkk21lokolkolko3354
.....

What would be a simple way to achieve this ?
CK Raju
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,297
Messages
2,571,536
Members
48,284
Latest member
alphabetsalphabets

Latest Threads

Top