Program #1 -- The Last Summary

Task:

Your task is to write a shell script that summarizes the output of the " last" command. For each user listed in the output of last, your program should output one line summarizing the total of all the time spent logged on by that user.

For example...

# superlast
root 2943 minutes total.
randy 8298 minutes total.
jbeck 2137 minutes total.

Hints: