LPI
101-500 · Question #279
Which command will print to standard out only the lines that do not begin with # (pound symbol) in the file foobar?
The correct answer is B. /bin/grep -v ^# foobar. You've hit your Sonnet limit · resets Jun 8, 9am (UTC)
GNU and Unix Commands
Question
Which command will print to standard out only the lines that do not begin with # (pound symbol) in the file foobar?
Options
- A/bin/grep ^# foobar
- B/bin/grep -v ^# foobar
- C/bin/grep #$ foobar
- D/bin/grep -v #$ foobar
How the community answered
(26 responses)- A4% (1)
- B88% (23)
- C8% (2)
Explanation
You've hit your Sonnet limit · resets Jun 8, 9am (UTC)
Topics
#grep command#regex anchors#pattern matching#command-line filtering
Community Discussion
No community discussion yet for this question.