guuzaa/wc
A wc like program written by C++ but built by Zig.
A wc
like program written by C++
but built by Zig
.
Clone the repository and build using Zig's build system:
git clone https://github.com/guuzaa/wc.git
cd wc
zig build
The executable will be available at zig-out/bin/wc
.
Count lines, words, and characters in a file:
wc file.txt
Count only lines in multiple files:
wc -l file1.txt file2.txt
Count words from standard input:
cat file.txt | wc -w
Licensed under Apache-2.0 license (LICENSE or http://opensource.org/licenses/Apache-2.0)