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

grep command is a utility which helps in searching pattern
from the given file.

example

grep "pattern" /home/username/somefile.txt

it ll search all lines in the file somefile.txt and will
print the line which contains pattern.

there are many options as
-v = invert
-i = ignorecase
-c = count
-l = filename
-r = recursive

Is This Answer Correct ?    7 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I open the shell in cmd?

1043


How can we find the process name from its process id?

1124


Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

2595


What is inside a seashell?

1067


State the advantages of shell scripting?

1008


how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com

2515


What is the use of a shebang line?

1110


What is k shell?

898


How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?

1053


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

977


Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.

1017


What is the difference between grep and egrep?

1067


how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?

4016


Is powershell a bash?

1014


How to get script name inside a script?

957