|
||
---|---|---|
src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
README.md |
README.md
wc-res
I wanted to build something useful in Rust, so I built a version of
wc
. It supports the following queries:
-m
: Print the amount of characters in a file.-c
: Prints the number of bytes the file is comprised of.-l
: Prints the number of lines the file has-w
: Prints the number of words
If no query is provided, it displays the number of bytes, number of lines and finally the number of words, in that order.
This is how it can be used:
wc-rs <query> <file>
wc-rs <file>
It also supports pipes:
cat <file> | wc-rs <query>
cat <file> | wc-rs