Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

All of this done with grep tool. Particular stuck on part D-G. 5. Finding Words in the Linux Dictionary You should find a dictionary of

All of this done with grep tool. Particular stuck on part D-G.

image text in transcribed

5. Finding Words in the Linux Dictionary You should find a dictionary of American English (word list, no definitions) at /usr/share/dict/words. If you look at the first 20 words, you will see that many of the "words" are not common words, but may include abbreviations, proper nouns, etc. Each of the following steps should be done using /usr/share/dict/words as the source for words to be found. a) Give the command to find all words of any length beginning with the lowercase letter "x". b) Observe that the output from (a) includes many cases of a word and its possessive form (eg. xenon and xenon's). Give a single command that finds the words starting with "x", but not including the possessive forms. Run the command again to get a count of the number of such words. c) Give the command to find all words of any length in which the letter "q"is followed by a letter other than "u". After you verify the output, run again to get the count - how many are there? What do you observe about all of the words found? d) Give the command to find all words of any length that contain only the vowels -aeiou. What did you find? Extend this to include x'. Give the command to do this. How many words do you find now? e) Give the command to find all 6 letter words that use only the letter 'abcdef. The letters may appear in any order, and some may appear more than once and thus some may not appear at all How many such words did you find? f) Observe that several of the words returned in (e) have double letters (e.g. accede). Starting with the command from (e), filter out the words with double letters. What is the combined filter command? How many words did you find? HINT: consider how you would find words with double letters and then use the -voption. g) Generalize 0) to eliminate all words with repeated letters, in other words each of the six letters 'abcdef may appear exactly once in the word. [In my version of the dictionary, there are none.] Try again with the letters 'aeorst'and with 'acegly. What words did you find? This can used to solve "Jumble" type puzzles. 5. Finding Words in the Linux Dictionary You should find a dictionary of American English (word list, no definitions) at /usr/share/dict/words. If you look at the first 20 words, you will see that many of the "words" are not common words, but may include abbreviations, proper nouns, etc. Each of the following steps should be done using /usr/share/dict/words as the source for words to be found. a) Give the command to find all words of any length beginning with the lowercase letter "x". b) Observe that the output from (a) includes many cases of a word and its possessive form (eg. xenon and xenon's). Give a single command that finds the words starting with "x", but not including the possessive forms. Run the command again to get a count of the number of such words. c) Give the command to find all words of any length in which the letter "q"is followed by a letter other than "u". After you verify the output, run again to get the count - how many are there? What do you observe about all of the words found? d) Give the command to find all words of any length that contain only the vowels -aeiou. What did you find? Extend this to include x'. Give the command to do this. How many words do you find now? e) Give the command to find all 6 letter words that use only the letter 'abcdef. The letters may appear in any order, and some may appear more than once and thus some may not appear at all How many such words did you find? f) Observe that several of the words returned in (e) have double letters (e.g. accede). Starting with the command from (e), filter out the words with double letters. What is the combined filter command? How many words did you find? HINT: consider how you would find words with double letters and then use the -voption. g) Generalize 0) to eliminate all words with repeated letters, in other words each of the six letters 'abcdef may appear exactly once in the word. [In my version of the dictionary, there are none.] Try again with the letters 'aeorst'and with 'acegly. What words did you find? This can used to solve "Jumble" type puzzles

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_2

Step: 3

blur-text-image_3

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

Database And Expert Systems Applications Dexa 2022 Workshops 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 In Computer And Information Science 33

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Alfred Taudes ,Atif Mashkoor ,Johannes Sametinger ,Jorge Martinez-Gil ,Florian Sobieczky ,Lukas Fischer ,Rudolf Ramler ,Maqbool Khan ,Gerald Czech

1st Edition

3031143426, 978-3031143427

More Books

Students also viewed these Databases questions

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago