Overview
This project is a command-line utility for counting characters, words, lines, and bytes in a text file.
Features
- Counts bytes, characters, words, and lines.
- Supports multiple input files.
- Customizable command-line options.
Usage
To use the utility, run the following command:
./ccwc [OPTION] [FILE]
Replace [OPTION] with:
-c
to count bytes-l
to count lines-w
to count words-m
to count characters
Command Examples
Here are examples of running the commands:
Counting Bytes
$ ./ccwc -c /test.txt
342384 bytes test.txt
Counting Lines
$ ./ccwc -l test.txt
7190 lines test.txt
Counting Words
$ ./ccwc -w test.txt
58164 words test.txt
Counting Characters
$ ./ccwc -m test.txt
342384 characters test.txt
Counting All
$ ./ccwc test.txt
342384 bytes 342384 characters 7190 lines 58164 words test.txt
Get It On GitHub
Check out the repository for more details and the source code:
GitHub Repository