Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elliotwutingfeng/ccwc
ccwc is a simplified clone of wc written in Go
https://github.com/elliotwutingfeng/ccwc
unix
Last synced: 6 days 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 (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-29T22:43:38.000Z (about 2 months ago)
- Last Synced: 2024-11-29T23:26:05.679Z (about 2 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
[![Go Reference](https://img.shields.io/badge/go-reference-blue?logo=go&logoColor=white&style=for-the-badge)](https://pkg.go.dev/github.com/elliotwutingfeng/ccwc)
[![Go Report Card](https://goreportcard.com/badge/github.com/elliotwutingfeng/ccwc?style=for-the-badge)](https://goreportcard.com/report/github.com/elliotwutingfeng/ccwc)
[![Coveralls](https://img.shields.io/coverallsCoverage/github/elliotwutingfeng/ccwc?logo=coveralls&style=for-the-badge)](https://coveralls.io/github/elliotwutingfeng/ccwc?branch=main)[![GitHub license](https://img.shields.io/badge/LICENSE-BSD--3--CLAUSE-GREEN?style=for-the-badge)](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
```