2.3. Where can I learn to use sed?
2.3.1. Books
Sed & Awk, 2d edition, by Dale Dougherty & Arnold Robbins
(Sebastopol, Calif: O'Reilly and Associates, 1997)
ISBN 1-56592-225-5
https://www.oreilly.com/catalog/sed2/noframes.html
About 40 percent of this book is devoted to sed, and maybe 50
percent is devoted to awk. The other 10 percent covers regexes and
concepts common to both tools. If you prefer hard copy, this is
definitely the best single place to learn to use sed, including its
advanced features.
The first edition is also very useful. Several typos crept into the
first printing of the first edition (though if you follow the
tutorials closely, you'll recognize them right away). A list of
errors from the first printing of sed & awk is available at
<https://www.cs.colostate.edu/~dzubera/sedawk.txt>, and errors in
the 2nd are at <https://www.cs.colostate.edu/~dzubera/sedawk2.txt>,
though most of these were corrected in later printings. The second
edition tells how POSIX standards have affected these tools and
covers the popular GNU versions of sed and awk. Price is about (US)
$30.00
-----
Mastering Regular Expressions, 2d ed., by Jeffrey E. F. Friedl
(Sebastopol, Calif: O'Reilly and Associates, 2002)
ISBN 0-596-00289-0
https://regex.info
https://www.oreilly.com/catalog/regex2/
https://public.yahoo.com/~jfriedl/regex/ (for the first edition)
Knowing how to use "regular expressions" is essential to effective
use of most Unix tools. This book focuses on how regular
expressions can be best implemented in utilities such as perl, vi,
emacs, and awk, but also touches on sed as well. Friedl's home page
(above) gives links to other sites which help students learn to
master regular expressions. His site also gives a Perl script for
determining a syntactically valid e-mail address, using regexes:
https://public.yahoo.com/~jfriedl/regex/code.html
-----
Awk und Sed, by Helmut Herold.
(Bonn: Addison-Wesley, 1994; 288 pages)
2nd edition to be released in March 2003
ISBN 3-8273-2094-1
https://www.addison-wesley.de/main/main.asp?page=home/bookdetails&ProductID=37214
2.3.2. Mailing list
If you are interested in learning more about sed (its syntax, using
regular expressions, etc.) you are welcome to subscribe to a
sed-oriented mailing list. In fact, there are two mailing lists
about sed: one in English named "sed-users", moderated by Sven
Guckes; and one in Portuguese named "sed-BR" (for sed-Brazil),
moderated by Aurelio Marinho Jargas. The average volume of mail for
"sed-users" is about 35 messages a week; the average volume of mail
for "sed-BR" is about 15 messages a week.
sed-BR mailing list: https://br.groups.yahoo.com/group/sed-br/
sed-users mailing list: https://groups.yahoo.com/group/sed-users/
To subscribe to sed-users, send a blank message to:
[email protected]
To unsubscribe from sed-users, send a blank message to:
[email protected]
2.3.3. Tutorials, electronic text
The original users manual for sed, by Lee E. McMahon, from the
7th edition UNIX Manual (1978), with the classic "Kubla Khan"
example and tutorial, in formatted text format:
https://sed.sourceforge.net/grabbag/tutorials/sed_mcmahon.txt
The source code to the preceding manual. Use "troff -ms sed" to
print this file properly:
https://plan9.bell-labs.com/7thEdMan/vol2/sed
https://cm.bell-labs.com/7thEdMan/vol2/sed
"Do It With Sed", by Carlos Duarte
https://www.dbnet.ece.ntua.gr/~george/sed/OLD/sedtut_1.html
"Sed: How to use sed, a special editor for modifying files
automatically", by Bruce Barnett and General Electric Company
https://www.grymoire.com/Unix/Sed.html
U-SEDIT2.ZIP, by Mike Arst (16 June 1990)
ftp://ftp.cs.umu.se/pub/pc/u-sedit2.zip
ftp://ftp.uni-stuttgart.de/pub/systems/msdos/util/unixlike/u-sedit2.zip
ftp://sunsite.icm.edu.pl/vol/wojsyl/garbo/pc/editor/u-sedit2.zip
ftp://ftp.sogang.ac.kr/pub/msdos/garbo_pc/editor/u-sedit2.zip
U-SEDIT3.ZIP, by Mike Arst (24 Jan. 1992)
https://www.student.northpark.edu/pemente/sed/u-sedit3.zip
CompuServe DTPFORUM, "PC DTP Utilities" library, file SEDDOC.ZIP
Another sed FAQ
https://www.dreamwvr.com/sed-info/sed-faq.html
sed-tutorial, by Felix von Leitner
https://www.math.fu-berlin.de/~leitner/sed/tutorial.html
"Manipulating text with sed," chapter 14 of the SCO OpenServer
"Operating System Users Guide"
https://ou800doc.caldera.com/SHL_automate/CTOC-Manipulating_text_with_sed.html
"Combining the Bourne-shell, sed and awk in the UNIX environment
for language analysis," by Lothar Schmitt and Kiel Christianson.
This basic tutorial on the Bourne shell, sed and awk downloads as a
71-page PostScript file (compressed to 290K with gzip). You may
need to navigate down from the root to get the file.
ftp://ftp.u-aizu.ac.jp/u-aizu/doc/Tech-Report/1997/97-2-007.tar.gz
available upon request from Lothar Schmitt <[email protected]>
2.3.4. General web and ftp sites
https://sed.sourceforge.net/grabbag # Collected scripts
https://main.rtfiber.com.tw/~changyj/sed/ # Yao-Jen Chang
https://www.math.fu-berlin.de/~guckes/sed/ # Sven Guckes
https://www.math.fu-berlin.de/~leitner/sed/ # Felix von Leitner
https://www.dbnet.ece.ntua.gr/~george/sed/ # Yiorgos Adamopoulos
https://www.student.northpark.edu/pemente/sed/ # Eric Pement
https://spacsun.rice.edu/FAQ/sed.html
ftp://algos.inesc.pt/pub/users/cdua/scripts.tar.gz (sed and shell scripts)
"Handy One-Liners For Sed", compiled by Eric Pement. A large list
of 1-line sed commands which can be executed from the command line.
https://sed.sourceforge.net/sed1line.txt
https://www.student.northpark.edu/pemente/sed/sed1line.txt
"Handy One-Liners For Sed", translated to Portuguese
https://wmaker.lrv.ufsc.br/sed_ptBR.html
The Single UNIX Specification, Version 3 (technical man page)
https://www.opengroup.org/onlinepubs/007904975/utilities/sed.html
Getting started with sed
https://www.cs.hmc.edu/tech_docs/qref/sed.html
masm to gas converter
https://www.delorie.com/djgpp/faq/converting/asm2s-sed.html
mail2html.zip
https://www.crispen.org/src/#mail2html
sample uses of sed in batch files and scripts (Benny Pederson)
https://users.cybercity.dk/~bse26236/batutil/help/SED.HTM
dc.sed - the most complex and impressive sed script ever written.
This sed script by Greg Ubben emulates the Unix dc (desk
calculator), including base conversion, exponentiation, square
roots, and much more.
https://sed.sourceforge.net/grabbag/scripts/dc_overview.htm
If you should find other tutorials or scripts that should be added
to this document, please forward the URLs to the FAQ maintainer.