A cli tool written in python to count lines, words, characters and bytes.
This project is inspired by codingchallenges.fyi
wc-cli [-clmw] [file ...]
The following options are available:
- -c: The number of bytes in each input file is written to the standard output. This will cancel out any prior usage of the -m option.
- -l: The number of lines in each input file is written to the standard output.
- -m: The number of characters in each input file is written to the standard output. If the current locale does not support multibyte characters, this is equivalent to the -c option. This will cancel out any prior usage of the -c option.
- -w: The number of words in each input file is written to the standard output.
-
Clone the repo
git clone https://github.com/mranish592/wc-cli.git
-
Add an alias to run the python script.
bash wc-cli/install-alias-bash.sh
zsh wc-cli/install-alias-zsh.sh
- Python alias added in ~/.zshrc
- How to take file input for python
- How to read lines as text in python
- How to read files as binary in python
- How to parse the options and files from arguments
- How to handle multiple files
- How to read from Standard input in python