From the sed man page:
Sed is a stream editor. A stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline).
Simple find-and-replace in text file
To replace all occurrences of the string findme and replace it with the string replaceme in a file named test.file using
sed just use the follwing command.
Removing a complete XML element with body
Consider the following XML formated addressbook.
Lets say we want to remove Bob from this addressbook.