Question: Write a script called count.bash that, for each regular file in the working directory, prints the filename, the # of lines, and the # of
Write a script called count.bash that, for each regular file in the working directory, prints the filename, the # of lines, and the # of words to stdout, like this:
breadIsDangerous.txt
spellExample
Do not use find
You might read up on Parameter expansion in bash, or look at the cut utility.
Test your script with filenames that have spaces in them. Get it right.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
