How could I write a script to combine the like check numbers and add their charges, to create one line per check number with a total charge. example of lines:
check # check date charge
11211 01/03/06 10.00
11212 01/03/06 15.00
11212 01/03/06 20.00
11212 01/03/06 15.00
11213 01/03/06 5.00
11213 01/03/06 10.00
I want the script to make the lines look like this:
check # check date charge
11211 01/03/06 10.00
11212 01/03/06 50.00
11213 01/03/06 15.00
I'm not sure on the logic OR how to write it. I have AIX 4.3, Korn shell, and DBC utilities such as reformat, sort, etc..Thanks for any help.
Tommy