Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Sed
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==History== First appearing in [[Version 7 Unix]],{{r|reader}} sed is one of the early Unix commands built for command line processing of data files. It evolved as the natural successor to the popular [[grep]] command.<ref name=early_history> {{cite web | title = On the Early History and Impact of Unix | url = http://www.columbia.edu/~rh120/ch001j.c11 | quote = "A while later a demand arose for another special-purpose program, gres, for substitution: g/re/s. Lee McMahon undertook to write it, and soon foresaw that there would be no end to the family: g/re/d, g/re/a, etc. As his concept developed it became sed…" }} </ref> The original motivation was an analogue of grep (g/re/p) for substitution, hence "g/re/s".<ref name="reader">{{cite tech report |first1=M. D. |last1=McIlroy |author-link1=Doug McIlroy |year=1987 |url=http://www.cs.dartmouth.edu/~doug/reader.pdf |title=A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986 |series=CSTR |number=139 |institution=Bell Labs}}</ref> Foreseeing that further special-purpose programs for each command would also arise, such as g/re/d, McMahon wrote a general-purpose line-oriented stream editor, which became sed.<ref name=early_history /> The syntax for sed, notably the use of <code>/</code> for [[pattern matching]], and <code>s///</code> for substitution, originated with [[ed (text editor)|ed]], the precursor to sed, which was in common use at the time,<ref name=early_history /> and the regular expression syntax has influenced other languages, notably [[ECMAScript]] and [[Perl]]. Later, the more powerful language [[AWK]] developed, and these functioned as cousins, allowing powerful text processing to be done by [[shell script]]s. sed and AWK are often cited as progenitors and inspiration for Perl, and influenced Perl's syntax and semantics, notably in the matching and substitution operators. [[GNU]] sed added several new features, including [[#In-place editing|in-place editing]] of files. ''Super-sed'' is an extended version of sed that includes regular expressions compatible with [[Perl]]. Another variant of sed is ''minised'', originally reverse-engineered from 4.1BSD sed by [[Eric S. Raymond]] and currently maintained by [[René Rebe]]. minised was used by the [[GNU Project]] until the GNU Project wrote a new version of sed based on the new GNU regular expression library. The current minised contains some extensions to BSD sed but is not as [[feature-rich]] as GNU sed. Its advantage is that it is very fast and uses little memory. It is used on embedded systems and is the version of sed provided with [[Minix]].<ref>{{Cite web |last1=Raymond |first1=Eric Steven |author-link1=Eric S. Raymond |last2=Rebe |first2=René |author-link2=René Rebe |date=2017-03-03 |title=tar-mirror/minised: A smaller, cheaper, faster SED implementation |url=https://github.com/tar-mirror/minised |url-status=live |archive-url=https://web.archive.org/web/20180613031040/https://github.com/tar-mirror/minised |archive-date=2018-06-13 |access-date=2024-05-20 |website=[[GitHub]]}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Sed
(section)
Add topic