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 Quorum Group? and Quorum Disk?

1 Answers   IBM,


Differentiate swapping and paging.

1 Answers  


How to display the contents of a file?

1 Answers  


Can you tell me something about wildcard interpretation?

1 Answers  


What are states that the page can be in, after causing a page fault?

1 Answers  


How to move a background job to forward?

1 Answers  


What is the significance of the superuser?

1 Answers  


What is the full form unix?

1 Answers  


Who is founder of unix?

1 Answers  


Explain about the directory representation in UNIX?

1 Answers  


What are the criteria for choosing a process for swapping into memory from the swap device?

1 Answers  


What are data structures that are used for Demand Paging?

1 Answers  


Categories