Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asasmith/ccwc
A version of the Unix wc command line utility using Go
https://github.com/asasmith/ccwc
Last synced: 15 days ago
JSON representation
A version of the Unix wc command line utility using Go
- Host: GitHub
- URL: https://github.com/asasmith/ccwc
- Owner: asasmith
- Created: 2024-05-28T19:00:55.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-28T19:24:09.000Z (7 months ago)
- Last Synced: 2024-11-06T00:15:57.179Z (2 months ago)
- Language: Go
- Size: 126 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Coding Challenges wc tool
I'm in the process of learning Go and I came across the [Coding Challenges](https://codingchallenges.fyi/challenges/intro/) website.
This challenge is to build a version of the Unix wc command line tool. [Wikipedia](https://en.wikipedia.org/wiki/Wc_(Unix))# Usage
```
// build binary
go build .
``````
// from the project root./ccwc path-to-file
``````
./ccwc ./test.txt// expected output
// 7145 58164 342190 ./test.txt
```Supports flags for byte count `-c`, line count `-l`, character count `-m`, and word count `-w`. If no flag is passed the tool returns `-c`, `-l`, and `-w` options.
Also supports `-help` flag.
```
Usage of ./ccwc:
-c Returns byte count for file
-l Returns line count for file
-m Returns character count for file
-w Returns word count for file```