This challenge (from Coding Challenges) is to build our own version of the Unix command line tool wc!
- Step 1: Write a simple version of wc that takes the command line option -c and outputs the number of bytes in a file.
- Step 2: Add support for the command line option -l that outputs the number of lines in a file.
- Step 3: Add support for the command line option -w that outputs the number of words in a file.
- Step 4: Add support for the command line option -m that outputs the number of characters in a file.
- Step 5: Add support for no command line options, which should default to the same output as a having the -c, -l, and -w options.
- Step 6: Add support for being able to read from standard input if no filename is specified.