What is the syntax of "grep" command?

Answer Posted / satchi

Grep is a filter used for pattern matching in shell script.

It searches for the patern if file name is give, or else it
will look for the input data using pipe(|)

Syntax:

1. Grep <patern to search> <Filename>
2. cat <filename> | grep <Patern to search.>

we can use -i option to ignore case sensitiveness.There are
so many options available.you have to explore that.

Is This Answer Correct ?    18 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to set an array in linux?

667


What is another name for a bash shell script that you might see?

1096


Why are there shells on the beach?

677


Which is better perl or shell scripting?

641


What is bourne shell scripting?

608






What is a shell script in windows?

650


How do I open the shell prompt?

672


Explain about gui scripting?

712


What are the different types of commonly used shells on a typical linux system?

643


What is the default shell of solaris?

651


What is awk in shell script?

837


What is .sh file in mac?

633


What is the difference between scripting and coding?

617


What language is bash written in?

641


write a shell script to check the failed jobs?

4035