X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Rod Pemberton" 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: References: <4c64a5b1-bf8a-49e1-843e-9a0594856e82 AT c36g2000yqm DOT googlegroups DOT com> <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" wrote in message news:83mxwt17tq DOT fsf AT gnu DOT org... > From: "Rod Pemberton" > > "Rugxulo" 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