My solution to this challenge https://codingchallenges.fyi/challenges/challenge-wc
- clone this repository onto your machine
- run
npm i -gto install the script globally - to use
my-wc:cd <THE FOLDER CONTAINING THE FILE YOU WOULD LIKE INFO ON>- (optional) run
pwdto check that you are in the desired location - run
my-wc <FILE NAME>to print the number of line, words, and bytes followed by the file name. - run
my-wc <FILE NAME> -lto print the number of lines only - run
my-wc <FILE NAME> -wto print the number of words only - run
my-wc <FILE NAME> -cto print the number of bytes only
command: wc [OPTION]... [FILE]... outputs: Print newline, word, and byte counts for each FILE If multiple file: also prints a total line
- multpile files can be processed at ones
- when multiple files are processed, the total is displayed