LPI
101-400 · Question #21
Which grep command will print only the lines that do not end with a / in the file foo?
The correct answer is C. grep -v '/$' foo. See the full explanation below for the reasoning.
Question
Which grep command will print only the lines that do not end with a / in the file foo?
Options
- Agrep '/$' foo
- Bgrep '/#' foo
- Cgrep -v '/$' foo
- Dgrep -v '/#' foo
How the community answered
(30 responses)- A3% (1)
- B3% (1)
- C83% (25)
- D10% (3)
Community Discussion
No community discussion yet for this question.