The sed “stream editor” is one of the most prominent text-processing tools on Unix and Linux. 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
Syntax of sed commands
Group summary of sed commands
Alphabetical summary of sed commands
The version of sed provided with Linux systems is the GNU version written by the Free Software Foundation; its home page is http://www.gnu.org/software/sed/sed.html. For more information on sed, see Dale Dougherty and Arnold Robbins’s sed & awk (O’Reilly).