Entry
Utility:Search/Replace:Regular expression:Command line: What is SED? [Linux/Microsoft Windows/SubML]
Nov 19th, 2006 03:18
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 28 March 2005 - 09:00 pm ----------------------
Utility:Search/Replace:Regular expression:Command line: What is SED?
[Linux/Microsoft Windows/SubML]
===
SED = 'S'tream 'ED'itor
===
SED is written by the late Lee E. McMahon in 1973.
---
A brief history of sed's origins may be found in an early history of
the Unix tools, at
http://www.columbia.edu/~rh120/ch106.x09
---
Sed is a program with the only goal to execute bulk search-and-replace
actions on any ASCII file, according to script files using UNIX regular
expressions.
===
Originally written and designed for Unix, sed has been ported to
MS-DOS, Windows, Linux, and other operating systems.
===
Sed is a non-interactive editor that works from a command line.
===
To run sed from the Microsoft MSDOS command line
--- cut here: begin --------------------------------------------------
sed "here comes your sed commands" yourinput.file >youroutputfile
--- cut here: end ----------------------------------------------------
To run sed with a .sed script from the Microsoft MSDOS command line,
use
--- cut here: begin --------------------------------------------------
sed -f yourscript.sed yourinput.file >youroutputfile
--- cut here: end ----------------------------------------------------
===
Example of a .sed file with regular expression search/replace
instructions:
--- cut here: begin --------------------------------------------------
/^$/d
/<html>/d
/<body>/d
/<\/body>/d
--- cut here: end ----------------------------------------------------
===
Internet: see also:
---
[Internet: source: http://www.google.com search for 'sed what is sed':
http://www.student.northpark.edu/pemente/sed/sedfaq2.html#s2.1]
---
Download SED version for Microsoft Windows
[Internet: source: http://www.google.com search for 'sed: what is
sed': http://www.cornerstonemag.com/sed/]
---
[Internet: source: http://www.google.com search for 'subml':
http://www.faqs.org/docs/electric/Devel/markup.html]
---
Search/Replace: Regular Expression: Links: Can you give an overview of
links?
http://www.faqts.com/knowledge_base/view.phtml/aid/34985/fid/828
----------------------------------------------------------------------