how to use grep command to list find the records of a file
containg 10 different strings

Answer Posted / siva

try this command

egrep "string1|string2|string3" <filename.extn>

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a directory?

549


What are internal and external commands in unix?

463


How to calculate the number of words in a file?

516


Explain what is inode?

548


In what way the validity fault handler concludes?

556






What a pipe?

576


What does shebang mean in unix?

503


What are the main features of unix?

492


How unix is different from other operating systems?

515


What are shell variables?

497


How is unix different from other operating system?

492


What is process termination in unix?

475


How to remove the first line/header from a file in Unix?

557


Discuss the mount and unmount system calls ?

546


What are pipes and filters in unix?

620