https://github.com/elliotwutingfeng/ccwc
ccwc is a simplified clone of wc written in Go
https://github.com/elliotwutingfeng/ccwc
unix
Last synced: 5 months ago
JSON representation
ccwc is a simplified clone of wc written in Go
- Host: GitHub
- URL: https://github.com/elliotwutingfeng/ccwc
- Owner: elliotwutingfeng
- License: bsd-3-clause
- Created: 2023-10-11T09:15:34.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-30T21:02:59.000Z (8 months ago)
- Last Synced: 2025-01-10T06:49:14.473Z (6 months ago)
- Topics: unix
- Language: Go
- Homepage:
- Size: 143 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ccwc
[](https://pkg.go.dev/github.com/elliotwutingfeng/ccwc)
[](https://goreportcard.com/report/github.com/elliotwutingfeng/ccwc)
[](https://coveralls.io/github/elliotwutingfeng/ccwc?branch=main)[](LICENSE)
## Summary
**ccwc** is a simplified clone of [wc](https://en.wikipedia.org/wiki/Wc_(Unix)) written in Go.
## Usage
First, build the CLI application.
```sh
# `git clone` and `cd` to the ccwc repository folder first
make build_cli
```Then use the `c`, `l`, `w` and/or `m` flags to count number of bytes, lines, words, and characters in **test.txt**.
```sh
./dist/ccwc -c test.txt # Count bytes
``````sh
./dist/ccwc -l test.txt # Count lines
``````sh
./dist/ccwc -w test.txt # Count words
``````sh
./dist/ccwc -m test.txt # Count characters
```Piping in from standard input is also supported.
```sh
cat test.txt | ./dist/ccwc -l
```