Lecture 4. Pattern Matching

Lecture 4. Click here to download the "theory" part of today's lecture. What you see below is the highlights + a number of practical examples.


Commands and the shell (carry-over from the last class )


Searching within files


More subtle differences


Learning to grep


Egrep examples

Assume you are given the file sample.txt. You can do cat -n sample.txt (so that you can see the line numbers). Let's do some pattern matching now.

Return Home