Linux Today: Linux News On Internet Time.

More on LinuxToday

SunWorld: Hands-off editing with sed, Part 1

Dec 27, 1999, 17:04 (2 Talkback[s])
(Other stories by Mo Budlong)

"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

Related Stories: