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

What is nr in awk command?

695


Differentiate cat command from more command.

664


What command will change your prompt to myprompt?

809


what is the advaantage of each user having its own copy of the shell?

2148


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

769






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

679


How do I run a whois command?

691


What is the difference between grep and grep?

670


What happens when we execute a unix command?

695


What is the use of tee command?

651


How do I search for a file in unix command?

635


What is $0 bash?

749


Which command will print your home directory on screen?

666


Explain the steps that a shell follows while processing a command.

767


What are grep patterns?

675