sed—Stream Editor

sed is a stream editor. It is a noninteractive text editor, which enables you to edit a text file directly from the command line. Editing a file with sed takes place one line at a time, and because of this, the entire file does not need to be stored in a buffer. Because the file does not need to be stored in a buffer, there is no limit on the size of the file that can be edited. This is a good tool for editing files that are too large for the other editors.

The stream editor does not operate in an interactive mode like most of the other editors. Modifications that are made can only be reviewed after the editing has been performed. The command syntax for sed is as follows:

sed 'address/pattern/   action'  filename 

The sed

Get Inside Solaris™ 9 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.