Question: Complete the following commands and write regular expressions that could be used by grep to find lines in a file myfile.txt that contains strings with
Complete the following commands and write regular expressions that could be used by grep to find lines in a file myfile.txt that contains strings with the following patterns:
(17) Lines that begin with an upper-case letter (A through Z).grep -E '______________________' myfile.txt
(18) Lines containing at least two adjacent digit characters (i.e., 17, 01, 42, 33, 00, etc.).grep -E '____________________' myfile.txt
(19) Lines containing 7 or more characters between letter N and digit character 8.
grep -E '____________________' myfile.txt
(20) Lines that contain two or more of the vowels a, e, i, o, u.
grep E '____________________' myfile.txt
(21) Lines that contain a url that starts with http:// followed by anything, then followed by either .edu or .org. There may be anything else on the line before or after this url.
egrep E '____________________' myfile.txt
22. Give a command that uses a pipe and prints out line 5 to line 10 of a text file.
______________________________________________________
23. Give a single command to count the number of lines in the document mydoc:
____________________________________________________
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
