What is the syntax of "grep" command?

Answer Posted / vasanth

grep: Find lines in a file that match a regular expression

syntax: grep [options] pattern [files]

Useful Options : -v, -l, -L, -c, -n, -b, ,-i

-v Print only lines that donot match the regular expression
-l Print only names of files that contains matching
lines,not the line themseleves

for furthur information
pls ref. linux pocket guide by Daniel J. Barrett (page-71)

Is This Answer Correct ?    14 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is shell variable?

601


What is the first line in a shell script?

641


What language is bash?

565


How do scripts work?

690


How do I set bash as default shell mac?

648






Where is bash history?

584


Can we run shell script in windows?

659


Write a command sequence to find the count of each word?

617


How do you find out What is your shell?

668


What is console line?

653


What is a shell in operating system?

660


What is $1 in shell scripting?

674


What is gui scripting?

696


What is the difference between bash and shell?

723


What happens on a system call?

636