Crates.io | ccwc |
lib.rs | ccwc |
version | 0.1.0 |
source | src |
created_at | 2024-02-07 15:31:42.486447 |
updated_at | 2024-02-07 15:31:42.486447 |
description | A simple CLI tool to mimic wc |
homepage | https://github.com/adriano-henrique/coding_challenges/blob/main/ccwc/README.md |
repository | https://github.com/adriano-henrique/coding-challenges |
max_upload_size | |
id | 1130630 |
size | 355,384 |
This Coding Challenge has the main objective of implementing a clone of the wc CLI tool common to Unix systems in Rust. The main purpose of the wc tool is to count word, line and character.
The usage of this tool is the following:
ccwc <pattern> <path>
It is worth mentioning that if path is not provided the argument will expect to read from stdin. Meaning that a command like:
cat <file_path> | ccwc -c
will count the amount of letters in <file_path>.
If the pattern is not provided, meaning that you pass directly the file the tool will calculate every single count (character, word and line).