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)- A7% (1)
- B13% (2)
- C80% (12)
Community Discussion
No community discussion yet for this question.