|Christian Nicola 70667bfdc7|
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>
It also supports pipes:
cat <file> | wc-rs <query>
cat <file> | wc-rs