trying to implement wc-tool in go, part of this challenge: https://codingchallenges.fyi/challenges/challenge-wc
build:
go build
run:
- bytes count
./wc-tool-go wc -c test.txt
342190 test.txt
- lines count
./wc-tool-go wc -l test.txt
7145 test.txt
- words count
./wc-tool-go wc -w test.txt
58164 test.txt
- char count
./wc-tool-go wc -m test.txt
339292 test.txt
- no options
./wc-tool-go wc test.txt
7145 58164 342190 test.txt
- reading from stdin if no file is specified
cat test.txt | ./wc-tool-go wc
7145 58164 342190