A small command-line tool written in Go to count words, lines, and bytes/characters from files or standard input.
- Count words, lines, and bytes.
- Read from files or STDIN.
Build locally:
make buildBasic usage:
wc-cli [flags] [file...]If no files are provided, wc-cli reads from standard input.
Common flags:
- -w Count words
- -l Count lines
- -c Count bytes
Combine flags to display multiple metrics.
Count words in a file:
wc-cli -w file.txtCount lines and bytes for multiple files:
wc-cli -l -c file1.txt file2.txtPipe input:
cat file.txt | wc-cli -w