QuestionQuestion

Instructions

This assignment demonstrates the use of regular expressions using the grep and egrep commands - as well as the use of special characters and various quotation marks.

Create a text file that contains the following lines:

This is a line that tests * and sees if $2.00 goes far

This is line two.

This is line 3

This is line four

this is line five$

this is line six*

^ stands for the beginning of a line

Next, demonstrate the behavior of at least the following five various regular expressions:*, . (dot), $, ^, [ ], on the lines of the text file created above. Use both the grep and egrep commands for each of the five regular expressions, as well as demonstrate the use of grep and egrep without quotation marks, with single quotations, and with double quotations respectively. Also demonstrate and explain the use of the escape character \ and how it affects the output of grep/egrep. Compile the results and explain the behavior that produced the results for each of the five and the escape character. When using the [ ], enclose 23 inside – and interpret the results of the grep/egrep commands. And lastly, answer the question: “Why is there only a significant difference with the * regular expression? “

Capture screen shot(s) for all of the above operations using the five regular expressions and escape character into a separate file.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Unix With Shell Programming
    $63.00 for this solution

    PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

    Find A Tutor

    View available Linux Tutors

    Get College Homework Help.

    Are you sure you don't want to upload any files?

    Fast tutor response requires as much info as possible.

    Decision:
    Upload a file
    Continue without uploading

    SUBMIT YOUR HOMEWORK
    We couldn't find that subject.
    Please select the best match from the list below.

    We'll send you an email right away. If it's not in your inbox, check your spam folder.

    • 1
    • 2
    • 3
    Live Chats