what is the use of "grep" command?

Answer Posted / pavankumar

grep is used to matching a pattern in a file...
we can use regular expressions in conjuction with grep.
suppose for example if you want to find the all occurences of
pavan in a file, you can use...
grep pavan *
it searches all files in the current directory files and
returns all those files which contain pavan.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why metadb requires a seperate slice to create Solaris volume manager

2556


What does sed command do in unix?

566


Write a command to display a file’s contents in various formats?

627


Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

591


What is the command to compare two files in unix?

624






How do I run a whois command?

605


Can you enlist some commonly used network commands?

602


Why is it called grep?

563


Which command will print your home directory on screen?

546


Explain command to view process running?

617


hw will u use awk in replacing cahrs and files

2736


What are reported commands?

568


How to display no of records in oracle using unix command?

589


how to sort the content of the file based on numeric values

1254


Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?

799