Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 do I run a powershell script?

1128


Explain about sourcing commands?

1083


Given a file find the count of lines containing the word "abc".

1549


How to print pid of the current shell?

987


Explain about login shell?

1112


What is bash eval?

1002


What does egrep mean?

959


How can I send a mail with a compressed file as an attachment?

1032


How do I edit a .sh file?

1135


What is echo in shell?

1098


What is scripting autism?

1208


What is bash shell command?

1000


Write down the syntax of "for " loop

1090


What is the significance of the shebang line in shell scripting?

1111


What is meant by $1 in shell script?

947