Which command would you use?

You want to search the file myfile for all occurances of string containing at least five characters, where character number 2 and 5 are ‘a’ and character number 3 is
NOT ‘b’. Which command would you use?

You want to search the file myfile for all occurances of string containing at least five characters, where character number 2 and 5 are ‘a’ and character number 3 is
NOT ‘b’. Which command would you use?

A.
grep a*^b*a myfile

B.
grep .a[^b].a myfile

C.
grep .[a].*.[a] myfile

D.
grep .a*^b..a myfile



Leave a Reply 0

Your email address will not be published. Required fields are marked *