What is the syntax of grep command and what is its use?

Answer Posted / bharath

grep command is used to search a file for keywords.
grep 'keyword' file

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

808


What does this command do? Cat food 1 > kitty

1233


What are awk commands?

799


What is unix command?

875


Is it inbetween or in between?

799


Is ‘du’ a command? If so, what is its use?

838


What does the command '$ls | wc –l > file1' do?

901


What is the size of time_t?

893


How do I clear my terminal history?

800


What command is used to switching between users in unix?

764


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

847


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

805


Which command is used to find whether the system is 32 bit or 64 bit?

837


Why is grep called grep?

993


What is ‘ps’ command for?

844