how to find multiple string?

Answers were Sorted based on User's Feedback



how to find multiple string?..

Answer / sarvan

Use extended grep command

egrep 'searchstr1 | searchchstr2' file.txt

Is This Answer Correct ?    18 Yes 1 No

how to find multiple string?..

Answer / satyaranjan samal

grep -e 'string 1' -e 'string 2' filename

Is This Answer Correct ?    8 Yes 2 No

how to find multiple string?..

Answer / amedela chandra sekhar

fgrep 'searchstr1 | searchchstr2' file.txt

Is This Answer Correct ?    9 Yes 6 No

how to find multiple string?..

Answer / pree

grep -e 'string1|string2' <filename>

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Unix General Interview Questions

Explain about the directory representation in UNIX?

0 Answers  


What is unix operating system explain various components of unix operating system?

0 Answers  


What is meant by u-area?

0 Answers  


What do you understand by the term single user system?

0 Answers  


What is difference between ssh v1 and ssh v2?

0 Answers  


What are data structures that are used for Demand Paging?

0 Answers  


Explain what is inode?

0 Answers  


How to get the last word from a line in Unix file?

0 Answers  


How to create a blank file in unix?

0 Answers  


What is the architecture of unix operating system?

0 Answers  


What is the root directory in unix?

0 Answers  


A process is running for 1000 times.How to kill all processes except one i.e kill 999 processes?

1 Answers   Subex,


Categories