delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2010/04/24/19:45:17

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT havenone DOT cmm>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GNU sed question
Date: Sat, 24 Apr 2010 19:32:12 -0400
Organization: Aioe.org NNTP Server
Lines: 38
Message-ID: <hqvuv5$noj$1@speranza.aioe.org>
References: <qah3t59tamdcag9gm26mkkhddj96gs984s AT 4ax DOT com> <4c64a5b1-bf8a-49e1-843e-9a0594856e82 AT c36g2000yqm DOT googlegroups DOT com> <hqu6vv$28n$1 AT speranza DOT aioe DOT org> <83mxwt17tq DOT fsf AT gnu DOT org>
NNTP-Posting-Host: pldq+kT97bAAp/ObDwnZyQ.user.speranza.aioe.org
X-Complaints-To: abuse AT aioe DOT org
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1983
X-Notice: Filtered by postfilter v. 0.8.2
X-Newsreader: Microsoft Outlook Express 6.00.2800.1983
X-Priority: 3
X-MSMail-Priority: Normal
Bytes: 2244
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Eli Zaretskii" <eliz AT gnu DOT org> wrote in message
news:83mxwt17tq DOT fsf AT gnu DOT org...
> From: "Rod Pemberton" <do_not_have AT havenone DOT cmm>
> > "Rugxulo" <rugxulo AT gmail DOT com> wrote in message
news:4c64a5b1-bf8a-49e1-843e-9a0594856e82 AT c36g2000yqm DOT googlegroups DOT com...
> > >
> > > P.S. I love GNU sed, but in my experience it's pretty darn
> > > slow on big files.
> > >
> >
> > I've not used it.  I have need of VI, occasionally.  I prefer DOS EDIT,
> > but it and other DOS editors seem unable to do two things that
> > VI can do.
>
> VI and EDIT are unrelated to Sed.

So?

> Sed is a _stream_ editor, it edits
> files in batch mode, not interactively.
> It is suitable for scripts
> that need to edit text.
>

Which is much like, if not the same as, what I mentioned that I did [you
snipped] by generating AWK scripts from VI commands...  Yes?

Except for command line issues, the Sed command the OP posted is the
same as the EX/ED commands in VI.  He could do the same for them: generate
AWK scripts from Sed commands, manually or programmatically.  Using AWK
could possibly provide an improvement in processing speed.  I've seen AWK
and VI on every non-Windows machine I've ever used, including the
non-Unix/Linux ones where you wouldn't expect to seen them.


RP


- Raw text -


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