wc command line tool
- -b --byte - Print byte count
- -w --word - Print word count
- -l --line - Print newline count
To read from a file use
wc-cli <flag> <filename...>To read from the standard input use
cat <filename> | wc-cli <flag>1. Printing number of lines in a file
wc-cli -l <filename(s)>You can pass input from stdin
cat <filename> | wc-cli2. Printting number of bytes in a file
wc-cli -m <filename(s)>3. Printing number of words in a file
wc-cli -w <filename(s)>- Have more robust testing strategies, to test reading input from the standard input