Question: Using Unix: Answer the following questions. 1. Record the expression that must be used to view the following in a file: a. The 1st line
Using Unix: Answer the following questions.
1. Record the expression that must be used to view the following in a file:
a. The 1st line ending in the word: crime
b. A line containing any of the character sequences: two, three, four, six or seven.
c. A line containing the name Holmes followed by any number of characters and then Watson.
d. A sequence of 3 or more vowels (aeiou in upper or lower case) in a row.
e. A line containing between 10 and 18 characters. You need to match both the beginning and end of the line in your pattern otherwise you will match lines that are longer than the requirement.
.
2. Using Unix, and must be using egrep, record the command that must be used to view the following:
a. Find all lines that contain the name Holmes followed by Watson or Watson followed by Holmes.
b. One of Holmes enemies is the infamous femme fatale Irene Adler. Find all lines that contain the name Adler then run the output through egrep a 2nd time eliminating all lines that contain Irene.
c. Use egrep to determine the number of image tags are in the text.
d. Do a case insensitive search looking for the whole words the, that, these and those.
e. Look for lines that contain more than 4 punctuation marks that are separated by at least 1 alphabetic letter. Using () to enclose a pattern helps.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
