1.Write a regular expression that you could use with egrep that will find all en
ID: 3869755 • Letter: 1
Question
1.Write a regular expression that you could use with egrep that will find all entries in /usr/share/dict/words that are exactly 12 characters in length (words longer than 12 should not appear).
2.Write a regular expression that you could use with egrep that will find all entries in /usr/share/dict/words that have a q (or Q) without a u immediately after.
3.Write a regular expression that you could use with egrep that will match lines in the names.txt file that have cities whose names are multiple (i.e. 2 or more) words
Explanation / Answer
1. ls | egrep ^......$
2. ls | egrep ^q | grep -v ^.u
3. ls | egrep ^.*[[:space:]].*$ | grep -v ^.*[[:space:]].*[[:space:]].*$
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.