PrepAway - Latest Free Exam Questions & Answers

Which command will print to standard out only the lines that do not begin with # (pound symbol) in the file fo

Which command will print to standard out only the lines that do not begin with # (pound symbol) in the file foobar?

PrepAway - Latest Free Exam Questions & Answers

A.
/bin/grep ^# foobar

B.
/bin/grep -v ^# foobar

C.
/bin/grep #$ foobar

D.
/bin/grep -v #$ foobar

Explanation:
A) would grep for all lines starting with #
C) would grep for all lines ending with #
D) would grep for all lines not ending with #


Leave a Reply