nerdexam
LPI

117-101 · Question #149

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

(37 responses)
  • A
    14% (5)
  • B
    73% (27)
  • C
    3% (1)
  • D
    3% (1)
  • E
    8% (3)

Community Discussion

No community discussion yet for this question.

Full 117-101 Practice