Question: Write a shell script b. Word-Character Count (lwcc) Write a script (called lwce) to count and report the number of characters and words in each
b. Word-Character Count (lwcc) Write a script (called lwce) to count and report the number of characters and words in each line of a given file(s). The input to the script is a file list (one or more files separated by a space). The reported output shall include, for each file, the file name followed by a colon () on one line, and starting from the next line it shall print one triplet ### wc## cc### per line of the input file, such that five triplets, separated by " ", are printed per output line. For example, suppose the input file is called abed which contains the 5 lines above, then the output of the command "wcc abcd" would print the following: abcd: 001 wc19 cce99 002 wc21 cc101 e03 wc19 cc100 004 wc19 cce99 ee5 wc14 cc073
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
