Re: how to substutue string in a text file

2003-01-27 Thread Bret Hughes
On Mon, 2003-01-27 at 17:17, Cameron Simpson wrote: > On 09:56 26 Jan 2003, Bret Hughes <[EMAIL PROTECTED]> wrote: > | > | the g/foo/ one I am going to have to read up on before beginning to ask > | > | a question about it :) > | > > | > Thinks of it like a pre-grep for the target lines. > | > |

Re: how to substutue string in a text file

2003-01-27 Thread Cameron Simpson
On 09:56 26 Jan 2003, Bret Hughes <[EMAIL PROTECTED]> wrote: | > | the g/foo/ one I am going to have to read up on before beginning to ask | > | a question about it :) | > | > Thinks of it like a pre-grep for the target lines. | | Yeah I get the g/foo/ part it is the .-2,.+2m0 that looks like gi

Re: how to substutue string in a text file

2003-01-26 Thread Bret Hughes
On Sun, 2003-01-26 at 03:35, Cameron Simpson wrote: > On 21:27 14 Jan 2003, Bret Hughes <[EMAIL PROTECTED]> wrote: > | Am I close? this is more flexible than trying to build a regex that > | would do the same thing in the syntax I have used in the past. I never > | have sucessfully atomized let

Re: how to substutue string in a text file

2003-01-26 Thread Cameron Simpson
On 21:27 14 Jan 2003, Bret Hughes <[EMAIL PROTECTED]> wrote: | On Tue, 2003-01-14 at 20:50, Cameron Simpson wrote: | > It separates selection from operation. It says, "globally, for all lines | > containing abdfggg, substitute that (// being 'that') with opsmsdd". | > | > You can do more flexible

Re: how to substutue string in a text file

2003-01-15 Thread Robert P. J. Day
On 14 Jan 2003, Bret Hughes wrote: > the g/foo/ one I am going to have to read up on before beginning to ask > a question about it :) > > Bret one of my favorite applications of that operator is to print all lines containing a pattern while in vi with: :g//p as in :g/root/p the pattern

Re: how to substutue string in a text file

2003-01-14 Thread Bret Hughes
On Tue, 2003-01-14 at 20:50, Cameron Simpson wrote: > On 11:01 14 Jan 2003, Bret Hughes <[EMAIL PROTECTED]> wrote: > | On Mon, 2003-01-13 at 13:18, Samuel Flory wrote: > | > [EMAIL PROTECTED] wrote: > | > >or try: > | > >:g/abdfggg/s//opsmsdd/g from vi/vim > | > > | > That's really the hard way. >

Re: how to substutue string in a text file

2003-01-14 Thread Cameron Simpson
On 11:01 14 Jan 2003, Bret Hughes <[EMAIL PROTECTED]> wrote: | On Mon, 2003-01-13 at 13:18, Samuel Flory wrote: | > [EMAIL PROTECTED] wrote: | > >or try: | > >:g/abdfggg/s//opsmsdd/g from vi/vim | > | > That's really the hard way. | > :%s/abdfggg/opsmsdd/g works just as well and makes more sense.

Re: how to substutue string in a text file

2003-01-14 Thread Bret Hughes
On Mon, 2003-01-13 at 13:18, Samuel Flory wrote: > [EMAIL PROTECTED] wrote: > > >or try: > >:g/abdfggg/s//opsmsdd/g from vi/vim > > > > > > > > That's really the hard way. > > :%s/abdfggg/opsmsdd/g works just as well and makes more sense. > This is the vi syntax I am familier with. What is

Re: how to substutue string in a text file

2003-01-13 Thread Samuel Flory
[EMAIL PROTECTED] wrote: or try: :g/abdfggg/s//opsmsdd/g from vi/vim That's really the hard way. :%s/abdfggg/opsmsdd/g works just as well and makes more sense. PS- Remember that you can use anything as a delimiter in both vim and sed. sed -e s/abcde/edcba/ is the same as sed -e s,abc

RE: how to substutue string in a text file

2003-01-13 Thread Cliff Wells
. > > > > > > Rick > > > > -Original Message- > > From: Jianping Zhu [mailto:[EMAIL PROTECTED]] > > Sent: Monday, January 13, 2003 8:22 AM > > To: [EMAIL PROTECTED] > > Subject:how to substutue string in a text f

RE: how to substutue string in a text file

2003-01-13 Thread Cliff Wells
> > Hope this helps, > Andy. > > > -----Original Message----- > From: Jianping Zhu [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 13, 2003 8:22 AM > To: [EMAIL PROTECTED] > Subject: how to substutue string in a t

Re: how to substutue string in a text file

2003-01-13 Thread Mark Lundy
How about sed? sed s/abdfggg/opsmsdd/g text_file Mark [EMAIL PROTECTED] wrote: or try: :g/abdfggg/s//opsmsdd/g from vi/vim Good luck Bob Jack Bowling <[EMAIL PROTECTED]> wrote: On Mon, Jan 13, 2003 at 08:21:44AM -0500, Jianping Zhu wrote: how to substutue string in a text f

Re: how to substutue string in a text file

2003-01-13 Thread iverger
or try: :g/abdfggg/s//opsmsdd/g from vi/vim Good luck Bob Jack Bowling <[EMAIL PROTECTED]> wrote: >On Mon, Jan 13, 2003 at 08:21:44AM -0500, Jianping Zhu wrote: >> >> how to substutue string in a text file by using "gerp" or "find"? >> >&

Re: how to substutue string in a text file

2003-01-13 Thread Jack Bowling
On Mon, Jan 13, 2003 at 08:21:44AM -0500, 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",

Re: how to substutue string in a text file

2003-01-13 Thread T. Ribbrock
On Mon, Jan 13, 2003 at 08:55:42AM -0500, Robert P. J. Day wrote: [...] > my apologies -- i'd forgotten that that command comes with > the mysql RPM. replace is also available separately - see: http://replace.richardlloyd.org.uk/ Cheerio, Thomas --

Re: how to substutue string in a text file

2003-01-13 Thread Tibbetts, Ric
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? sed is your friend. sed 's/abdfggg/op

RE: how to substutue string in a text file

2003-01-13 Thread Rechenberg, Andrew
ect: how to substutue string in a text file 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? Thanks ---

RE: how to substutue string in a text file

2003-01-13 Thread Rick Carroll
om: Jianping Zhu [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 8:46 AM To: [EMAIL PROTECTED] Subject: RE: how to substutue string in a text file Thanks. but a little confused by your advice can u give more detail? Thanks On Mon, 13 Jan 2003, Rick Carroll wrote: >

Re: how to substutue string in a text file

2003-01-13 Thread Robert P. J. Day
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: > > > > > > > >

RE: how to substutue string in a text file

2003-01-13 Thread Jianping Zhu
a command into a variable. > > > Rick > > -Original Message- > From: Jianping Zhu [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 13, 2003 8:22 AM > To: [EMAIL PROTECTED] > Subject: how to substutue string in a text file > > > ho

Re: how to substutue string in a text file

2003-01-13 Thread Jianping Zhu
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"? > >

RE: how to substutue string in a text file

2003-01-13 Thread Rick Carroll
:22 AM To: [EMAIL PROTECTED] Subject:how to substutue string in a text file 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", i

Re: how to substutue string in a text file

2003-01-13 Thread Robert P. J. Day
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 t

how to substutue string in a text file

2003-01-13 Thread Jianping Zhu
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? Thanks Jianping Zhu Dep