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

Does windows 10 have unix?

0 Answers  


Name two paging states for a page in memory?

0 Answers  


Explain about the directory representation in UNIX?

0 Answers  


What will happens when we don't call of bind()and listen() in a normal echo server ? Q.33 (b). What are the purposes of the three file descriptors on which the syslogd daemon listens and does I/O multiplexing?

1 Answers  


Explain the terms links and symbolic links with respect to unix?

0 Answers  


What do you mean by the protection fault?

0 Answers  


What is grep|sort give example?

0 Answers  


Which mode executes the fault handler?

0 Answers  


What is hardlink and softlink in unix?

0 Answers  


What is the full form of unix?

0 Answers  


What are drawbacks of ssh v2?

0 Answers  


Which is a form of interprocess communication in unix?

0 Answers  


Categories