Exercise: implement wc


Implement the wc command of Unix/Linux: Given a name of file print out the number of lines, number of words, and number of characters in the file.

Given multiple file, print out the values for each file and then print out the totals for all the files.


examples/wc/one.txt
one two
three four five

examples/wc/two.txt
some text  and      a log spaces
and other characters ada-!@#$%^&*()-that-should-be-one-word
right?

 2   5  24 one.txt
 3  11 100 two.txt
 5  16 124 total