A project to implement GNU coreutils utilities in C++ and Zig. This is an ongoing effort to recreate the essential Unix/Linux command-line tools.
wc: Word, line, and byte counting utilitytrue: Do nothing, successfully (exit with status 0)false: Do nothing, unsuccessfully (exit with status 1)
The project aims to implement all core utilities, including but not limited to:
- File Management:
ls,cp,mv,rm,mkdir,cat, etc. - Text Processing:
head,tail,sort,uniq, etc. - System Information:
pwd,whoami,uname, etc. - And many more...
- Zig compiler (0.15.1 recommended)
Clone the repository and build using Zig's build system:
git clone https://github.com/guuzaa/coreutils.git
cd coreutils
zig buildThe executables will be available in zig-out/bin/.
wc Examples
Count lines, words, and characters in a file:
wc file.txtCount only lines in multiple files:
wc -l file1.txt file2.txtCount words from standard input:
cat file.txt | wc -wContributions are welcome! Feel free to:
- Implement new utilities
- Improve existing implementations
- Report bugs
- Suggest enhancements
Licensed under Apache-2.0 license (LICENSE or http://opensource.org/licenses/Apache-2.0)