https://github.com/guuzaa/wc
A wc like program written by C++ but built by Zig.
https://github.com/guuzaa/wc
cpp20 zig
Last synced: about 1 year ago
JSON representation
A wc like program written by C++ but built by Zig.
- Host: GitHub
- URL: https://github.com/guuzaa/wc
- Owner: guuzaa
- License: apache-2.0
- Created: 2025-04-08T11:19:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-08T13:57:59.000Z (about 1 year ago)
- Last Synced: 2025-04-08T14:41:13.449Z (about 1 year ago)
- Topics: cpp20, zig
- Language: C++
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A `wc` like program written by `C++` but built by `Zig`.
## Installation
### Prerequisites
- Zig compiler (0.14 recommended)
### Building from Source
Clone the repository and build using Zig's build system:
```bash
git clone https://github.com/guuzaa/wc.git
cd wc
zig build
```
The executable will be available at `zig-out/bin/wc`.
## Usage
### Examples
Count lines, words, and characters in a file:
```bash
wc file.txt
```
Count only lines in multiple files:
```bash
wc -l file1.txt file2.txt
```
Count words from standard input:
```bash
cat file.txt | wc -w
```
## License
Licensed under Apache-2.0 license ([LICENSE](LICENSE) or http://opensource.org/licenses/Apache-2.0)