https://github.com/ashinsan/zigwordcount
A simple `wc` clone written in Zig for learning purposes
https://github.com/ashinsan/zigwordcount
cli learning system-programming wc word-count zig
Last synced: 6 months ago
JSON representation
A simple `wc` clone written in Zig for learning purposes
- Host: GitHub
- URL: https://github.com/ashinsan/zigwordcount
- Owner: AshinSan
- License: mit
- Created: 2025-07-02T00:24:08.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-07-09T13:52:22.000Z (6 months ago)
- Last Synced: 2025-07-09T14:51:25.189Z (6 months ago)
- Topics: cli, learning, system-programming, wc, word-count, zig
- Language: Zig
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zwc - Zig Word Count
This is a small project I made to learn Zig and get comfortable with systems programming.
`zwc` is a CLI utility written in Zig to count the number of **lines**, **words**, **characters** in a text file similar to the UNIX `wc` CLI.
## Usage
```sh
zwc [FILE] [OPTION]
```
You can also pass other outputs instead of passing a file
```sh
echo hello world | zwc
```
## Options
- `-h`, `--help`: Show help messages.
- `-l`, `--list`: Show only line count.
- `-w`, `--word`: Show only word count.
- `-c`, `--char`: Show only character count.
- `-v`, `--verbose`: Verbose Mode.
- `--version`: Shows current version.
You can combine options:
`zwc input.txt -lwc` or `zwc input.txt -cw --line` etc.
## Example
```sh
zwc input.txt -l -c
```
## Build
```sh
zig build
```
## License
MIT (See [LICENSE](LICENSE) file)