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

Pipes support half duplex communication. But if we want full-duplex communications we should use two pipes between two processes. Is such situation can leads to deadlock? Write two scenarios that could leads to deadlock in such situations?

1 Answers   Vector India,


What is typeset in unix?

0 Answers  


Name two paging states for a page in memory?

0 Answers  


What are the core concepts of unix

0 Answers  


Differentiate multiuser from multitask.

0 Answers  






What is the core of unix operating system?

0 Answers  


What is $path in unix?

0 Answers  


What do you mean by unix operating system?

0 Answers  


What is Quorum Group? and Quorum Disk?

1 Answers   IBM,


How to know the present working directory in unix?

1 Answers  


What is unix kernel explain it?

0 Answers  


Why is it that it is not advisable to use root as the default login?

0 Answers  


Categories