Linux Search Pattern Question:
Download Questions PDF

How can you search for blank line in a file?
a) $ grep " " file
b) $ grep "^$" file
c) $ grep [" "] file
d) $ grep [^$] file

Search Pattern Interview Question
Search Pattern Interview Question

Answer:

d) $ grep [^$] file

Download Search Pattern Interview Questions And Answers PDF

Previous QuestionNext Question
Indicate the right option to search for BOB, Bob, BOb or BoB?
a) grep -i Bob files
b) grep 'B[oO][bB]' files
c) grep '[BOB]' files
d) grep -v 'Bob' files
Which option of grep displays the line number as well?
a) -v
b) -l
c) -n
d) -E