nerdexam
LPI

117-101 · 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. See the full explanation below for the reasoning.

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

(61 responses)
  • A
    3% (2)
  • B
    72% (44)
  • C
    8% (5)
  • D
    16% (10)

Community Discussion

No community discussion yet for this question.

Full 117-101 Practice