what is the function of grep command?

Answers were Sorted based on User's Feedback



what is the function of grep command?..

Answer / khemnath chauhan

grep command let us find the desire pattern in given
statements or from contents of file.
SYNOPSIS:
$grep <pettern to search> <file name>
this will find the particular pattern.

Is This Answer Correct ?    9 Yes 0 No

what is the function of grep command?..

Answer / bharath

grep command is used to search a string or a keyword in a
file.
syntax:
grep 'keyword' file

Is This Answer Correct ?    6 Yes 3 No

what is the function of grep command?..

Answer / dhina

Grep will help us to display the particular information from
a file. For example.

grep apple fruitlist.txt

In this case, grep prints all lines containing 'apple' from
the file fruitlist.txt

Is This Answer Correct ?    3 Yes 0 No

what is the function of grep command?..

Answer / 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

More Unix Commands Interview Questions

How to know a process is a zombie or orphan process?

3 Answers   Perot Systems,


What is $0 bash?

0 Answers  


How do you grep recursively?

0 Answers  


Can a process kill itself in UNIX/or in its various versions?

2 Answers  


What is grep and sed command?

1 Answers  


to list a particular line in the file

5 Answers  


how to unzip the contents of the gzip file

1 Answers   Epsilon,


What does the command ' $who | sort –logfile > newfile' do?

0 Answers  


How do I run a bash script?

0 Answers  


What is the use of egrep command in unix?

0 Answers  


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

0 Answers  


What are the unix commands?

0 Answers  


Categories