Give a regular expression that finds two things, try to
come up with regular expressions that find each
individually using "egrep" command?

Answer Posted / shammi

Suppose yu have file name k.txt

naf@warsteiner:~:>cat k.txt
My name is harish
My name is Mark

Now naf@warsteiner:~:>egrep '(harish|Mark)' k.txt
My name is harish
My name is Mark

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do chmod, chown, chgrp commands do?

642


What command will change your prompt to myprompt?

710


Which unix command to make a new directory?

594


Differentiate cmp command from diff command.

592


How do you repeat a command in terminal?

598






What is pipe command in unix?

677


Why is shebang used?

600


What does the command ' $who | sort –logfile > newfile' do?

774


Explain ‘library functions’ with respect to unix commands?

606


What are awk commands?

586


Name the unix command to find how many days the server has been up.

612


What are bash commands?

601


Which command is used to delete all files in the current directory and all its sub-directories?

673


What is grep and how do you use it?

581


What is the command to find hidden files in the current directory?

589