nerdexam
LPI

101-400 · Question #284

101-400 Question #284: Real Exam Question with Answer & Explanation

The correct answer is B. grep .a[^b].a myfile. See the full explanation below for the reasoning.

Question

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?

Options

  • Agrep a*^b*a myfile
  • Bgrep .a[^b].a myfile
  • Cgrep .[a].*.[a] myfile
  • Dgrep .a*^b..a myfile

Community Discussion

No community discussion yet for this question.

Full 101-400 Practice