Misplaced Pages

Sed: Difference between revisions

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 13:14, 21 March 2002 editAxelBoldt (talk | contribs)Administrators44,507 edits not really a text editor. Turing complete← Previous edit Revision as of 23:36, 16 April 2002 edit undoDamian Yerrick (talk | contribs)Autopatrolled, Extended confirmed users, Pending changes reviewers15,091 editsm see also false friendNext edit →
Line 1: Line 1:
'''Sed''' is a ] utility which allows to modify text files. It reads in its input line by line, transforms these lines according to rules specified in a certain simple language, and outputs them. The rules often involve ]s. "Sed" stands for Stream EDitor, but is also the Latin word for ''but''. In a typical unix pipe command, you might say something like '''Sed''' is a ] utility which allows to modify text files.
It reads in its input line by line, transforms these lines according to rules specified in a certain simple language, and outputs them. The rules often involve ]s.
"Sed" stands for Stream EDitor, but is also the ] word for ''but'' and the ] word for ''thirst''.
(See also ].)
In a typical unix pipe command, you might say something like
:generate_data | sed -e 's/x/y/' :generate_data | sed -e 's/x/y/'
That is, generate the data, ''but'' make these small changes. That is, generate the data, ''but'' make these small changes.

Revision as of 23:36, 16 April 2002

Sed is a UNIX utility which allows to modify text files. It reads in its input line by line, transforms these lines according to rules specified in a certain simple language, and outputs them. The rules often involve regular expressions. "Sed" stands for Stream EDitor, but is also the Latin word for but and the Spanish word for thirst. (See also false friend.) In a typical unix pipe command, you might say something like

generate_data | sed -e 's/x/y/'

That is, generate the data, but make these small changes.

Sed is one of the very early unix commands that permitted command line processing of data files. Cousin to the later AWK, sed allowed powerful and interesting data processing to be done by shell scripts. Sed was probably the earliest Unix tool that really encouraged regular expressions to be used ubiquitously.

Sed and AWK are often cited as the progenitors and inspiration for Perl.

Sed's language does not have variables and only primitive GOTO and branching functionality; nevertheless, the language is Turing complete.

Sed: Difference between revisions Add topic