Professional Documents
Culture Documents
CM304
CM304
ANDHRA PRADESH
Name : A V N L Sarojini
Designation : Lecturer
Branch : Computer Engineering
Institute : A.A.N.M. & V.V.R.S.R. Poly.,
Gudlavalleru.
Year/Semester : III Semester
Subject : UNIX & C
Subject Code : CM-304
Topic : Shell Programming &
Filtering Techniques
Duration : 50 Min
Sub Topic : Usage of grep
Teacher Aids : PPT
CM304.22 1
Objective
grep command
grep command options
Searching for a pattern using grep command
Introduction to Regular expression.
CM304.22 2
Recap
CM304.22 4
Searching for a pattern using grep command
Syntax:
CM304.22 5
Searching for a pattern using grep command
CM304.22 6
Searching for a pattern using grep command
CM304.22 7
Searching for a pattern using grep command
CM304.22 8
Searching for a pattern using grep command
Option Description
-c Displays count of the number of occurrences.
-l Displays list of filenames only.
-n Displays line number along with the line.
CM304.22 9
Searching for a pattern using grep command
Option Description
-v Displays all but the lines matching the
expression.
-i Ignores case of matching.
CM304.22 10
Searching for a pattern using grep command
CM304.22 11
Searching for a pattern using grep command
CM304.22 12
Searching for a pattern using grep command
CM304.22 13
Searching for a pattern using grep command
CM304.22 14
Searching for a pattern using grep command
-i (ignore) option ignores case for pattern matching.
CM304.22 15
Regular Expression
CM304.22 16
Regular Expression
Expression Meaning
CM304.22 17
Regular Expression
Regular expression used by grep command are
Expression Meaning
CM304.22 19
Summary
CM304.22 20
Quiz
[TRUE / FALSE]
CM304.22 21
Quiz
[TRUE / FALSE]
CM304.22 22
Quiz
[TRUE / FALSE]
CM304.22 23
Quiz
[TRUE / FALSE]
CM304.22 24
Quiz
[TRUE / FALSE]
CM304.22 25
Quiz
[TRUE / FALSE]
CM304.22 26
Frequently Asked Questions
CM304.22 27