nerdexam
LPI

101-400 · Question #232

Which of the following commands would display the lines containing capital letters form the file "turkey.txt"?

The correct answer is B. grep -n [A-Z] turkey.txt. See the full explanation below for the reasoning.

Question

Which of the following commands would display the lines containing capital letters form the file "turkey.txt"?

Options

  • Acat turkey.txt|wc -|
  • Bgrep -n [A-Z] turkey.txt
  • Ccat turkey.txt|wc -w [A-Z]
  • Dgrep -v [A-Z] < turkey.txt
  • Efor [A-Z]in turkey.txt | count

How the community answered

(17 responses)
  • A
    6% (1)
  • B
    71% (12)
  • D
    12% (2)
  • E
    12% (2)

Community Discussion

No community discussion yet for this question.

Full 101-400 Practice