Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 6 PLEASE 1. What is the difference between ~grep~ and ~egrep~? What additional symbols are added? The only difference is the way they interpret

QUESTION 6 PLEASE

1. What is the difference between ~grep~ and ~egrep~? What additional symbols are added?

The only difference is the way they interpret the pattern. grep stands for Global Regular Expressions Print. egrep stands for Extended Global Regular Expressions Print.+ ? | are the additional symbols

2. Give an example of something that is easy to match but hard to validate (but not an example used in the lecture).

3. Is this a valid regular expression pattern, ~[a-zA-Z0-9]~? If so, what does it match? 4. Write *two* ~egrep~ commands to look for occurances of "abc" in a file called ~letters.txt~. 5. Modify one of the previous commands to just print how many occurances occured. Use the ~wc~ command to count how many lines there were. 6. What are the two replacement strings for regex? Give an example of both of them.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Discuss some reasons for the popularity of R.

Answered: 1 week ago