Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iambnlvn/zwc
wc unix command implemented in Zig
https://github.com/iambnlvn/zwc
unix unix-command zig ziglang
Last synced: 22 days ago
JSON representation
wc unix command implemented in Zig
- Host: GitHub
- URL: https://github.com/iambnlvn/zwc
- Owner: iambnlvn
- Created: 2024-06-15T19:37:49.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-15T21:24:17.000Z (5 months ago)
- Last Synced: 2024-10-02T07:04:18.702Z (about 1 month ago)
- Topics: unix, unix-command, zig, ziglang
- Language: Zig
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project Name
**ZWC**
## Description
ZWC is a zig implementation of the `wc` command. It counts the number of lines, words, and characters in a file.
## Installation
To install this project, follow these steps:
1. Clone the repository.
**2.1 Manually via:**```sh
git clone https://github.com/iambnlvn/zwc
```**2.2 Using gh cli:**
```sh
gh repo clone iambnlvn/zwc
```2. Build the project with `zig build`.
3. Run the project with `./zig-out/bin/zwc`.## Usage
To use `zwc`,
```sh
./zig-out/bin/zwc
````zwc` supports standard input, so you can also use it like this:
```sh
echo "Say hi to your mom" | ./zig-out/bin/zwc
````
zwc supports the following flags:- `-l`: Print the number of lines in the file.
- `-w`: Print the number of words in the file.
- `-c`: Print the number of characters in the file.
- `-m`: is the default flag, and it prints the number of lines, words, and characters in the file.