what is the function of grep command?

Answer Posted / kavin

grep is used to filter or search for a pattern in the given
file.

for example
grep student class

will display only the lines that contains the word student
in it.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does sed command do in unix?

785


What is the first character of the output in ls l command?

866


Write a command that will find all text files in a directory such that it does not contain the word "amazing" in any form (that is, it must include the words amazing, amazing, or amazing)?

1194


What are the general commands in using unix os for a beginner?

806


Why is grep called grep?

991


why metadb requires a seperate slice to create Solaris volume manager

2778


What is the general format of unix command syntax?

1238


What is pipe command in unix?

898


What is the command to view process running?

800


Describe the zip/unzip command using gzip.

825


What is command substitution?

880


When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include # include int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

1970


What does #!/ Bin sh do?

766


What is the use of the command 'ls -x chapter[1-5]' ?

893


What is grep in bash?

768