nerdexam
LPI

101-500 · 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. You've hit your Sonnet limit · resets Jun 8, 9am (UTC)

GNU and Unix Commands

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

(29 responses)
  • A
    3% (1)
  • B
    90% (26)
  • C
    7% (2)

Explanation

You've hit your Sonnet limit · resets Jun 8, 9am (UTC)

Topics

#grep#regular expressions#pattern matching#character classes

Community Discussion

No community discussion yet for this question.

Full 101-500 Practice