iambnlvn/zwc
wc unix command implemented in Zig
ZWC
ZWC is a zig implementation of the wc command. It counts the number of lines, words, and characters in a file.
To install this project, follow these steps:
git clone https://github.com/iambnlvn/zwc
2.2 Using gh cli:
gh repo clone iambnlvn/zwc
zig build../zig-out/bin/zwc.To use zwc,
./zig-out/bin/zwc <file>
zwc supports standard input, so you can also use it like this:
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.