---

SunWorld: Hands-off editing with sed, Part 1

The Unix stream editor (sed) has some handy uses that other
editing tools can’t match: it can modify text across multiple files
and make changes to files without opening them in an interactive
editor.
This month, Mo walks you through some of sed’s unique
abilities.”

“With the sed utility (otherwise known as the Unix stream
editor), you can alter files without opening them in an interactive
editor. Instead, you use sed to specify a series of rules (edits)
or transformations that you want applied to lines of text, then
apply them to your file.”

“sed is not suitable as a general purpose editor, and is best
used to apply a set of modifications to text, particularly if
you’re managing more than one file. If you want to run a series of
once-only edits, you are better off directly editing a file using
vi or Emacs, as using sed will take much longer. But if you need to
make systematic changes across multiple files, then sed is your
best bet.”


Complete Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis