Re: Vi change command second try
- From: Harry <harryooopotter@xxxxxxxxxxx>
- Date: Wed, 28 Jan 2009 15:50:33 -0800 (PST)
On Jan 28, 12:38 pm, JAW <jwill...@xxxxxxxxxxxxxxxx> wrote:
FROM:
rcp -p /u31/oradata/TTTT/rbtsxx.dbf unix31u:/u31/oradata/TTTT/
rbtsxx.dbf
TO:
rcp -p /u31/oradata/TTTT/rbtsxx.dbf unix31u:/u31/oradata/ZZZZ/u31/
rbtsxx.dbf
I have a large file that looks like the above in the FROM section one
line:
Basically to get FROM and TO I used two
sets of VI commands. I changed the first TTTT to XXXX so I could
then
work on the second one (target) and then I change it back.
The net is I want to cahnge the second TTTT without changing the first
TTTT which is what I have always done.
How about an interactive confirmation ?.... like this:
:1,$s#TTTT#ZZZZ/u31#gc
Vi will prompt you for replacement for every occurrance
of TTTT. All you need to do is reponse with "n" for 1st
occrrence and with "y" for the 2nd accurence on each
line.
.
- References:
- Vi change command second try
- From: JAW
- Vi change command second try
- Prev by Date: Re: SIGKILL revisted
- Next by Date: Re: Vi change command second try
- Previous by thread: Vi change command second try
- Next by thread: Re: Vi change command second try
- Index(es):