Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a bash function that will accept a file name provided by the user and scan it word-by- word to determine how many vowels are

image text in transcribed

Write a bash function that will accept a file name provided by the user and scan it word-by- word to determine how many vowels are in each word and output a report of the findings to the terminal Call the bash script parsevowels.sh, and its resident function parse Vowels(). Ensure that all vowel parsing and results display logic is contained parse Vowels() function. . Only the code that a) prompts the user for a file name, b) validates the existence of this file, and c) passes the validated file name to the parse Vowels() function is to reside within the script's main body. . Only words within the nominated file that are four (4) or more characters in length are to have their resident vowels counted. Words of three (3) characters or less are to be excluded by yourfunction's logic and not appear in the on-screen vowel count report. Your function is to output the results of the vowel count process as shown Please enter name to parse passage.txt the file contains nordsof which are four letters or more in length. The vowel count for these 49 words are as follows: ./parsevowels.sh 4 contain a vowels, these being (myth] (crypt) (hymn (tryst] 11 contain I vowels, these being Itract] [varyl (Theyl (such] Istress] [that] [words) (nary [that] [don't) (such] 17 contain 2 vowels, these being Ivowell Isyllabiclispeech) (sound] (vocal) [Vowels) [classes] [speech] (sounds) fother] [being] [Vowels) (also] (closelyl (tone] [vowels] (there] 13 contain 3 vowels, these being Twithout] [stricturel (principali Iconsonant) quality (loudness] [quantity] (usuallyl (voiced) (involved] [prosodic) (however] [contain] 2 contain 4 vowels, these being (pronounced] [because 2 contain 5 vowels, these being: [variation intonation Screenshot Task 2-1 In the event that a particular vowel count has no words associated with it, inform the user as per the screenshot below: $ ./parsevowels.sh Please enter a file name to parse passage.txt The file contains so words, of which 49 are four letters or more in length. The vol count for these 49 words are as follows: 4 contain a vowels, these being myth] (crypt] [hy] (tryst] 11 contain 1 voels, these being Itract) (vary) (Theyl (such) (stress) (that) (words (nonyl (that) (don't (such] 18 contain 2 vowels, these being: [ovel] [syllabic speech [sound] (vecall (vowels] [classes] [speech] [sounds] [other] [being] [vowels] [also) [closely (tone) [inton] [vowels) [there] 14 contain 3 vowels, these being without) (stricture) (principal consonant quality] (toudness) quantity (usually (voice) (involved (prosodic] (variety) [However) (contain ? contain 4 vowels, these being (pronounced] (because There are no words that contain 5 vowels

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

What was your favorite subject in school?

Answered: 1 week ago