nerdexam
Novell

050-720 · Question #274

You have a text file that contains empty lines. Using grep and regular expressions, which command displays the file without the empty lines?

The correct answer is C. grep -v ^$ file. See the full explanation below for the reasoning.

Question

You have a text file that contains empty lines. Using grep and regular expressions, which command displays the file without the empty lines?

Options

  • Agrep ^$ file
  • Bgrep [\ ] file
  • Cgrep -v ^$ file
  • Dgrep -v #$ file

How the community answered

(15 responses)
  • A
    7% (1)
  • B
    13% (2)
  • C
    80% (12)

Community Discussion

No community discussion yet for this question.

Full 050-720 Practice