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 unix and why it is used?

0 Answers  


What is Process id in unix?

0 Answers  


What is unix environment?

0 Answers  


What is unix in simple terms?

0 Answers  


Where unix is used today?

0 Answers  






Which file system is used in unix?

0 Answers  


What can you tell about shell variables?

0 Answers  


How do I find my unix os version?

0 Answers  


Explain about shell aritmetic operators and functions?

0 Answers   HCL,


How to check the date in unix?

0 Answers  


What uses unix?

0 Answers  


How do I run a ksh script in unix?

0 Answers  


Categories