Question: 1. Use egrep and a regular expression to find all the words in /usr/share/dict/words that consist entirely of lowercase letters. egrep 'b[a-z]' /usr/share/dict/words | wc
1. Use egrep and a regular expression to find all the words in /usr/share/dict/words that consist entirely of lowercase letters.
egrep '\b[a-z]' /usr/share/dict/words | wc -w
402158
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.
Hint-1: My solution found 49 such entries.
Hint-2: Sometimes, for reasons unknown, users have a space before their name in the name field of /etc/passwd.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
