Linux Search Pattern Interview Preparation Guide Download PDF
Linux Search Pattern frequently Asked Questions by expert members with experience in Search Pattern. These questions and answers will help you strengthen your technical skills, prepare for the new job test and quickly revise the concepts
45 Search Pattern Questions and Answers:
1 :: Indicate the right option to search for anything not a letter or number:
a) grep '^[a-zA-Z0-9]'
b) grep '[^a-zA-Z0-9]'
c) grep '[a-zA-Z0-9]'
d) None of the above in Search Pattern
b) grep '[^a-zA-Z0-9]'
3 :: How do you remove duplicate lines from the file foo using uniq?
a) sort foo | uniq -u
b) sort -u foo | uniq -d
c) sort foo | uniq -c
d) sort foo | uniq -I
a) sort foo | uniq -u
8 :: 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
b) grep 'B[oO][bB]' files