[oclug] Regular Expression Workshop Wed Mar 27 @ ExitCertified
Brenda J. Butler
bjb at achilles.net
Thu Mar 7 23:43:37 EST 2002
I will give a two-hour workshop on Regular Expressions
on Wednesday March 27 at 19:00. It will be at the
ExitCertified location at 85 Albert, Suite 1200.
The topic covered will be the basics of regular
expressions, with a romp through grep, sed, awk, find
and perl. If there are emacs or vim users in the
audience I might point out the commands in those
editors which allow you to use the power of regular
expressions. I will also point out the need to escape
some of the regular expression characters from (for
instance) the shell, and the idea that many tools work
on a line-by-line basis but that it is configurable.
And I will try to show the different variants of
regular expressions used in these tools.
I hope to demonstrate some fairly simple routine linux
administration tasks using the above tools, thus
providing an introduction to regular expressions, the
tools, and linux systems in general. There will also
be a chance to try out some problem-solving in class on
the provided machines.
It is assumed that you know about as much Linux and
shell commands as Vic taught in his Intro to Bash
class. Basically I expect you to know:
- how to escape special characters from the shell;
- I hope you'll be somewhat familiar with a text editor
(perhaps nedit is available on the suns, it's pretty
intuitive although I've never seen it on Linux);
- a bit about the filesystem (the concept of a home
directory and a subdirectory and how to look at
them (ls, cd, pwd)).
- what is a man page, and how to look at one.
- a bit about how to redirect output via <, > and |;
- Oh, and what "output" is :-)
CLASS SIZE AND RESOURCES
There are spaces for 9 people to sit at a machine, and
there are more spaces for people to sit if you don't
mind not having a machine to work on. There are also
some network jacks that you can plug your laptop into.
The machines are Sun Ultra workstations running
Solaris. Don't worry, for our purposes they're very
similar to Linux. I will try to put together some data
files for us to work with that come from a Linux
Please send me an email if you plan to attend, also
indicate if you will be sharing a machine with a friend
or using a laptop connection. First come, first
served. Send emails to bjb at achilles.net.
I have a request to those of you who already know
regular expressions (or who are trying to learn it
currently): Please send me the details of problems or
gotchas you may have tripped over when trying to use
regular expressions. I will try to cover all the
simpler potential problems in the class, and if I ever
do a more advanced class then I can use the harder
problems as well.
Problems with any of the above tools are particularly
Also, a request to people who work with Linux daily,
could you please send me some typical tasks that you
use regular expressions for, and the files you work on.
I want to make this workshop relevant, and my
experience is more directed to programming so may be
less relevant to non-programmers.
And a request for what books/resources were handy
when you were learning regular expressions, and
what is a good reference tool for you now. I could
just search Amazon for books on regular expressions,
but I want to know what books are good ones.
Suggestions on refining workshop content also welcome.
I need to borrow a laptop to show the presentation
from, in order to preserve the ninth machine for a
student. If you can provide one please send me an
email. I would request X Windows, so that a browser
can display a postscript file. Also the ability to
show a console or xterm to demonstrate stuff with sed,
awk, perl, find and grep would be nice. And emacs
(that's the editor I'm most comfortable with).
Remember, XEmacs is a pale imitation of Gnu Emacs ;-)
I will try to post this a couple more times before the
presentation on Wednesday, March 27. Later posts might
even have more directions to the location. And there
may be corrections/changes to details in this post.
with a capital T to Sean and Peter and ExitCertified
for inviting us to use their premises.
bjb at achilles.net
Welcome to the GNU age! http://www.gnu.org
More information about the OCLUG