Before you start
Learn what to expect from this tutorial and how to get the most out of it.
This four-part tutorial series covers UNIX® from the ground up. The initial tutorial was a good brush-up for users who've been away from UNIX-like operating systems for some time. It's also useful for brand-new UNIX users coming from a Windows® background, because it uses references and comparisons to Windows. The second tutorial focused on the vi text editor, one of the most powerful (and mysterious) UNIX utilities available. This tutorial teaches you about the UNIX command-line filters that use regular expressions, including grep, sed, and awk.
Unlocking the power behind UNIX command-line filters, such as grep, sed, and awk, requires a solid understanding of regular expressions. This tutorial teaches new users what each of these utilities is capable of and how to use regular expressions to manipulate text. You'll start by using simple, playful examples with grep and progress to real-world examples of sed and awk.
The objective of this tutorial is to make UNIX and Linux® users comfortable with three powerful command-line tools that can be used to search for and alter data quickly and efficiently. The beginning of the tutorial explains regular expressions that are used in the basic framework of many UNIX utilities (and programming languages). The following sections give examples of using regular expressions with grep, sed, and awk.
You need a basic understanding of the command line for this tutorial. For some parts of this tutorial, a working understanding of how input and output is handled in UNIX with stdin, stdout, and pipe is also helpful.
Access to a user account on any computer running any UNIX-like operating system is all you need to complete this tutorial. UNIX-like operating systems include the IBM AIX® operating system, Linux, Berkeley Software Distribution (BSD), Mac OS® X (using Terminal to access the command line), and many others.


