Table of Contents
One of the most important (and powerful) parts of UNIX and Linux, and one that is often overlooked, is the concept of regular expressions.
Regular expressions could change your life (in the Linux world!!!) and if you don't know how to use them you will find yourself handicapped.
This chapter will not only teach you about regular expressions it will also teach how and when to use them.
First log in using your username.
Then you need files containing data. Go to the site and retrieve the file bazaar.txt. This is an extract from Eric S Raymond's book, "The Cathedral and the Bazaar" (the team highly recommends this book as per the preface to this course). All files you download from the site should be placed in your user area. Use the 'less' command to browse the file to familiarise yourself with it's contents. Repeat the process for the files:
emails1.txt emails2.txt emails3.txt columns.txt telnum.txt |
Thirdly, we need a program within Linux that uses regular expressions. For this we're going to use a program called sed. sed is one of those many "Swiss army knives" that you're going to find in Linux.
Note | |
---|---|
Some of the other tools that you will use regularly are: find, awk, perl and grep. |