https://github.com/prashanthatp/wc-cpp
Unix `wc` tool in C++
https://github.com/prashanthatp/wc-cpp
coding-challenges cpp cpp17 wc-tool
Last synced: about 1 year ago
JSON representation
Unix `wc` tool in C++
- Host: GitHub
- URL: https://github.com/prashanthatp/wc-cpp
- Owner: PrashanthaTP
- License: mit
- Created: 2025-02-11T16:55:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-05T09:14:10.000Z (over 1 year ago)
- Last Synced: 2025-04-05T10:22:21.982Z (over 1 year ago)
- Topics: coding-challenges, cpp, cpp17, wc-tool
- Language: C++
- Homepage:
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# WC Tool in C++




## Features
```bash
Usage: ccwc [OPTION] [FILE]
Options:
-c print the byte counts
-w print the word counts
-l print the newline counts
```
## Todo
- `-m` option to count characters
- Reading from standard input
- Handling when no options are passed
- Multiple files
## Building
- Clone the repository.
```bash
git clone git@github.com:PrashanthaTP/wc-cpp.git
```
- Run `build.sh`. Executable `ccwc.exe` gets generated in `build` folder.
```bash
cd wc-cpp; ./build.sh
```
## Testing
- Tests are written using [GoogleTest](git@github.com:PrashanthaTP/wc-cpp.git) library.
- Run tests using `test.sh`
```bash
./test.sh
```
## Acknowledgements
- [Build Your Own wc Tool](https://codingchallenges.fyi/challenges/challenge-wc) from [Coding Challenges
](https://codingchallenges.fyi/)