On Mon, 13 Jan 2003, Jianping Zhu wrote:

> i use "man replace" but find nothing
> 
> how to use replace?
> 
> Thanks
> 
> On Mon, 13 Jan 2003, Robert P. J. Day wrote:
> 
> > On Mon, 13 Jan 2003, Jianping Zhu wrote:
> > 
> > > 
> > >  how to substutue string in a text file by using "gerp" or "find"?
> > > 
> > > I have a text file, lof of "abdfggg" in that text file, i need to change
> > > it to "opsmsdd", is there a simple way to do that?
> > 
> > there's always the "replace" command.

my apologies -- i'd forgotten that that command comes with
the mysql RPM.  i use it instead of the standard perl technique:

$ perl -pi -e 's/abdfggg/opsmsdd/' filename(s)

you might want to use "-pi.bak" to create a backup copy
of the original file as well, just to play it safe.

rday



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to