Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am using ubuntu 1. Use egrep and a regular expression to find all the words in

ID: 3847772 • Letter: I

Question

I am using ubuntu

1. Use egrep and a regular expression to find all the words in /usr/share/dict/words that consist entirely of lowercase letters.

2. Use egrep and a regular expression to find all the movies in /tmp/bette.txt that have at least one repeated uppercase letter, such as The Watcher in the Woods (1980). (Note the two occurrences of W.)

3. Use egrep and a regular expression to find the one word in /usr/share/dict/words that has ELEVEN consecutive consonants, regardless of case.

4. Use egrep and a regular expression to find the one word in /usr/share/dict/words that starts and ends with the same eight characters.

5. Use egrep and a regular expression to find all the all-vowel (regardless of case) words in /usr/share/dict/words.

6. Use egrep and a regular expression to find the one word in /usr/share/dict/words that is composed entirely of 8 consonants (regardless of case)

7. Use egrep and a regular expression to find all the entries in /etc/passwd for those users whose first name as listed (in the name field) begins with a V or v.

Explanation / Answer

1. egrep '^[a-z]$' /usr/share/dict/words

2. egrep '(w[A-Z]){2,}' /tmp/bette.txt

3. egrep -o '[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]' /usr/share/dict/words

4. egrep '<([a-zA-Z]){8,}*([a-zA-Z]){8,}>' /usr/share/dict/words

5. egrep'<[aeiouAEIOU]>' /usr/share/dict/words

6. egrep -o '<[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]+[^aeiouAEIOU]>' /usr/share/dict/words

7. egrep '^[vV]*' /etc/passwd

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote