how to use grep command to list find the records of a file
containg 10 different strings

Answers were Sorted based on User's Feedback



how to use grep command to list find the records of a file containg 10 different strings..

Answer / raghu

egrep "word1|word2" filename

Is This Answer Correct ?    27 Yes 2 No

how to use grep command to list find the records of a file containg 10 different strings..

Answer / siva

try this command

egrep "string1|string2|string3" <filename.extn>

Is This Answer Correct ?    12 Yes 2 No

how to use grep command to list find the records of a file containg 10 different strings..

Answer / raja

egrep "string1|string2" *.*

Is This Answer Correct ?    0 Yes 1 No

how to use grep command to list find the records of a file containg 10 different strings..

Answer / supriya

grep 'word1|word2' <filename>

Is This Answer Correct ?    1 Yes 5 No

how to use grep command to list find the records of a file containg 10 different strings..

Answer / umakanta

grep -w 'word1|word2' filename

Is This Answer Correct ?    8 Yes 14 No

Post New Answer

More Unix General Interview Questions

What is tilde unix?

0 Answers  


How do we change file access permissions?

0 Answers  


What can you tell about shell variables?

0 Answers  


What is difference between unix and windows operating system?

0 Answers  


What is disk block allocation in unix?

0 Answers  






What is unix and its components?

0 Answers  


What are the advantages and disadvantages of unix operating system?

0 Answers  


Is a form of interprocess communication in unix?

0 Answers  


Is unix free?

0 Answers  


What does sort do in unix?

0 Answers  


What does ls lrt in unix?

0 Answers  


Does mac use unix?

0 Answers  


Categories