This is a this is a simple cli tool that essentially works like the wc command on most unix machines.
The tool supports using the pipe operator if there is no filename provided (example below.
If you want to buid and have this tool on your machine, you must have .NET 8.0 sdk installed on your machine. Follow the commands below to install globally on your machine.
# Clone to any directory you want
git clone https://github.com/avgra3/cswc.git
# Or whatever directory you cloned it to
cd cswc
# From the root directory of the project
dotnet pack --nologo -c Release --output ./nupkgs ./src/wc/wc.csproj
# Now time to install globally
dotnet tool install --global --add-source ./nupkgs avgra3.cswccswc --help
# Usage: wc [--bytes] [--words] [--lines] [--chars] [--help] [--version] input
#
# wc
#
# Arguments:
# 0: input a File or from standard input to be read
#
# Options:
# -c, --bytes print the byte counts
# -w, --words print the word counts
# -l, --lines print the newline counts
# -m, --chars print the character counts
# -h, --help Show help message
# --version Show versionecho "hello world!" | cswc
# Returns: 1 2 12The inspiration for this project comes from Coding Challenges.
The answer is probably not. the wc command works well enough but if you want your own version that you can hack on, this is a decent start. Feel free to fork it and make your own.