Chapter 10. The sed Editor

The sed “stream editor” is one of the most prominent Unix text processing tools. It is most often used for performing simple substitutions on data streams going through pipelines, but sed scripts can be written to do much more.

This chapter presents the following topics:

  • Conceptual overview of sed

  • Command-line syntax

  • Syntax of sed commands

  • Group summary of sed commands

  • Alphabetical summary of sed commands

Source code for GNU sed is available from ftp://ftp.gnu.org/gnu/sed/. The Free Software Foundation’s home page for sed is http://www.gnu.org/software/sed/sed.html. For more information on sed, see sed & awk, listed in the Bibliography.

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.