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

Explain ‘library functions’ with respect to unix commands?

603


What are awk commands?

582


What is the command to view process running?

574


What are some command words?

561


What is the search command in unix?

599






Which unix command lists files/folders in alphabetical order?

614


How do I use grep to find a file?

579


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

1250


What is $0 bash?

646


What is the functionality of a top command?

623


Which command is used to kill the last background job?

772


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

797


What does awk stand for?

605


What is the unix command to confirm a remote host is alive or not?

579


How does pipe () work?

593