Question: shell script We derive a histogram of line-lengths. You must write a shell-script named his to that can be called in either of two ways:

shell script

shell script We derive a histogram of line-lengths. You must write a

We derive a histogram of line-lengths. You must write a shell-script named his to that can be called in either of two ways: histo filename, which reads the file named filename; or histo, which reads from standard-input. Output the histogram like this: 1 4 2 10 3 9 4 12 6 17. .. 20 4 Where the first number is the length of the line, and the second number is the number of lines that were found with that length. If there are no lines of length, say 5, omit the line 5 0 from the output. Notice that there are no spaces before the first number

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!