nerdexam
LPI

117-010 · Question #2

Which of the following commands will output all of the lines with the name Fred in upper or lower case but not the word red from the file data_file? (Select TWO correct answers)

The correct answer is D. grep '[Ff]red' data_file E. grep -i fred data_file. See the full explanation below for the reasoning.

Question

Which of the following commands will output all of the lines with the name Fred in upper or lower case but not the word red from the file data_file? (Select TWO correct answers)

Options

  • Agrep -v fred data_file
  • Bgrep '[f]red' data_file
  • Cegrep fred data_file
  • Dgrep '[Ff]red' data_file
  • Egrep -i fred data_file

How the community answered

(48 responses)
  • A
    4% (2)
  • B
    17% (8)
  • C
    6% (3)
  • D
    73% (35)

Community Discussion

No community discussion yet for this question.

Full 117-010 Practice