Book HomeLinux in a NutshellSearch this book

Chapter 12. The sed Editor

Contents:

Conceptual Overview
Command-Line Syntax
Syntax of sed Commands
Group Summary of sed Commands
Alphabetical Summary of sed Commands

This chapter presents the following topics:

For more information, see the O'Reilly book sed & awk, 2d ed., by Dale Dougherty and Arnold Robbins.

12.1. Conceptual Overview

sed is a noninteractive, or stream-oriented, editor. It interprets a script and performs the actions in the script. sed is stream-oriented, because, as with many Unix programs, input flows through the program and is directed to standard output. For example, sort is stream-oriented; vi is not. sed's input typically comes from a file but can be directed from the keyboard. Output goes to the screen by default but can be captured in a file instead.

Typical uses of sed include:

sed operates as follows:



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.