Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karapetianash/word-counter-cli
CLI tool for counting words, lines or bytes of text from STDIN.
https://github.com/karapetianash/word-counter-cli
Last synced: about 2 months ago
JSON representation
CLI tool for counting words, lines or bytes of text from STDIN.
- Host: GitHub
- URL: https://github.com/karapetianash/word-counter-cli
- Owner: karapetianash
- Created: 2024-03-12T11:07:47.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-20T16:39:40.000Z (10 months ago)
- Last Synced: 2024-03-20T17:56:44.025Z (10 months ago)
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Introduction
This CLI tool counts the number of words, lines or bytes provided as input using the standard input (`STDIN`) connection. By default, this tool will count the number of words, unless it receives the `-l` flag, in which case it’ll count the number of lines instead, or the `-b` (or both `-l` and `-b` flags) flag for counting bytes. This version reads data from `STDIN` and displays the number of words.## Usage
To build the app, run the following command in the root folder:```
> go build .
```Above command will generate word-counter-cli file. This name is defined in the `go.mod` file, and it will be the initialized module name.
After that you can run the file using the cmd and pass the text argument for our app to run:
```
> .\word-counter-cli.exe -b
...some text...
```