A wc
clone in go to learn the language. This is a pretty barebones clone
The source of this challenge is: https://codingchallenges.fyi/challenges/challenge-wc
The reference documentation used is: https://linux.die.net/man/1/wc
Run go build
to generate the binary
Run ./rwc <command> <filename>
to count:
-c
: bytes-l
: lines-w
: words
- a minimal feature set of wc
- works with pipes (
cat test.txt | rwc
)