delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/22/23:31:22

Xref: news2.mv.net comp.os.msdos.djgpp:6287
From: weiqigao AT crl DOT com (Weiqi Gao)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What is SED
Date: Tue, 23 Jul 1996 02:17:21 GMT
Organization: Spectrum Healthcare Services
Lines: 37
Message-ID: <4t1cfn$nfo@nntp.crl.com>
References: <4t11ab$17h AT sjx-ixn3 DOT ix DOT netcom DOT com>
Reply-To: weiqigao AT crl DOT com
NNTP-Posting-Host: crl5.crl.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

pengzh AT ix DOT netcom DOT com(PENG ZHOU) wrote:

>HELLO,
>    I am a beginner at DJGPP.  I have been using C/C++ for years(MSVC),
>and now wants to program for the new 32bit evironment.  So I have alot
>things that is confusing and wants a answere.  I just downloaded the C
>version of DJGPP v2, and wants to look for some utilities, I found SED,
>which I don't know about.  I hadn't seen anything like SED in MSVC, so
>please can you help me with what is SED?  The documentation is hard to
>read.

SED should be spelled "sed" all lower case, as everything is in UNIX
(where case is sensitive, and it really is "sed" not "SED").

sed is a derivative of ed, the original line editor for UNIX.  The s
stands for stream.  So sed is a stream editor, the kind of editor that
you can use with your eyes closed.

It is typically invoked by the command line:
  sed -f sed_commands < input > output
usually inside a batch file, I mean, a shell script.  As you can
guess, all the power of sed is in the sed_command file.  This file has
lines of sed commands, to be applied to input file one by one to
produce the output file.  Each sed command transforms the input file
into the next intermediate form.

For a test, try  sed -f a < b > c,  where
a: s/\([0-9]*\)/-=\1=-/g
b: 12345 abcde 54321

Of course, people say the original author should have chosen "ex" (the
extended ed) instead of "ed" to base there new creation on!

--
Weiqi Gao
weiqigao AT crl DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019