My solution to the challenge Build Your Own wc Tool.
- Go (version 1.16 or higher).
-
Build the program:
go build ccwc.go
-
Run the program with the desired options:
./ccwc [options] <file>
or
cat <file> | ./ccwc [options]
- -c to count bytes
- -l to count lines
- -w to count words
- -m to count chars