Use grep -E and its regular expressions (REs) to perform matching on the dictionary file /usr/share/dict/words. You MUST use our dictionary file or your counts will be incorrect. Do NOT use pipes, avoid unnecessary quoting, and keep your REs as SIMPLE as possible. Be sure to consult the grep man page ("man grep" or grep(1)).
We will define a "letter" as one of 'a', 'b', ..., 'z', with NO case distinction. If for one of the searches below you find zero words, construct your own test file to ensure your RE is correct.
Search for the following:
words containing the substring "quid" (or "Quid", "quId", etc.)
words that start and end with the same letter, including one letter words
words that contain two occurrences of an IDENTICAL (case matters) substring of length 4
words with the same letter 3 times in a row
words that have 20 or more letters in them
words of length j, where 16 ≤ j ≤ 20 (any character counts toward the length, including an apostrophe)
words that have all 5 vowels (a, e, i, o, u) (case insensitive)
words that lack vowels
words that contain a SINGLE hyphen
words with all 5 vowels in alphabetical order, with no intervening vowels to break the sequence
Show ONLY word counts, and not the matching words! Modify this Bash script to echo and answer all of the above questions, following the example format. Use newline characters to skip TWO lines after each count. Answer the questions in the ORDER above.
Output what you're searching for followed by the number of matches. Skip two lines between answers. Do NOT output anything for question 0.
Output Format
1. words containing the substring "quid" (or "Quid", "quId", etc.) <number> 2. words that start and end with the same letter, including one letter words <number> ...
Submit your Bash script file (use an extension of ".sh").
No extra credit will be awarded for answering these questions. Linux COMMANDS can be used to answer the first three questions.
What directory contains the grep man page?
What file format is used to store the man page on disk?
What typesetting language was used to write the man page?
Can the man page be translated into other computer languages? Elaborate.