www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/15/04:01:13

From: phil <imbe AT primenet DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Replace program?
Date: 14 Nov 1997 22:58:00 -0700
Organization: Primenet Services for the Internet
Lines: 33
Message-ID: <346D3A98.3FCFA286@primenet.com>
References: <346C1F11 DOT 700D0D98 AT cdata DOT tvnet DOT hu> <346C62FB DOT 63D0 AT art DOT alcatel DOT fr>
MIME-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Olivier PERRON wrote:
> 
> Molnar Laszlo wrote:
> >
> > >Is there a GNU util, which replaces words/phrases in text-files? Kind of
> > >like grep but with a replacing option?
> >
> > If you need a really powerful tool, I'd suggest perl.
> >
> > Laszlo
> There are less powerful tools like awk or sed.
> With sed you can specify grep or egrep alike patterns with their
> replacement.
> Using bash, you could write:
> cat my_file | sed 's/my_pattern/my_replacement/g' > my_result_file
> You can also use ed but it is not very friendly to use especially if you
> never used vi.
> 
> Olivier.

i will agree re sed, but awk is just a good place to learn bad perl
coding!
LEARN Perl! it won't hurt one bit, and will surprise the hell out of
you; it's easy and verrrrrrry powerful.  there is an amusing package
called laola that *could* be used to write a M$word to TeX converter,
even.   

phil

oh yeah, and Laszlo's port of perl is EXCELLENT, but i don't think he
thinks i think so... even tho i can't seem to get curses statically
linked into it no matter how much i shove.  how about a cursperl,
Laszlo?

- Raw text -


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