Custom version of the Unix command line tool wc.
Generate the wc-tool executable from the root directory for use:
go build -o wc-tool cmd/wc-tool/main.goOutputs the number of bytes in a file, e.g.:
$ ./wc-tool -c test/test.txt
342190 test/test.txtOutputs the number of lines in a file.
$ ./wc-tool -l test/test.txt
7145 test/test.txtOutputs the number of words in a file.
$ ./wc-tool -w test/test.txt
58164 test/test.txtOutputs the number of characters in a file. If the current locale does not support multibyte characters this will match the -c option.
$ ./wc-tool -m test/test.txt
339292 test/test.txtNo options provided, equivalent to -c, -l, and -w options.
$ ./wc-tool test/test.txt
7145 58164 342190 test/test.txt$ cat test/test.txt | ./wc-tool -l
7145