Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 : Given a text file, write a script, mid 1 _ 1 . sh that takes two parameters. $ 1 , represents a
Question: Given a text file, write a script, midsh that takes two parameters.
$ represents a regex pattern to match words.
$ represents a text file. for the text file $ find all words that match $ and count the number of the occurrences of each word as well as the number of characters in the word. produce a table with the words sorted alphabetically and containing the columns word, count and letters. The provided script. count.sh can be used to count the number of characters of a word provided as a parameter to the script.
A sample invocation would be:
midsh th:alpha: speech.txt
may produce an output that looks like the following:
word, count, letters
that,
the,
their,
there,
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started