Results 1 to 3 of 3
I want to replace some entries in an -x file. The problem is the enties have a "/" in them. And as we all know the replace uses the "/" ...
- 06-06-2007 #1Linux Newbie
- Join Date
- Jun 2006
- Posts
- 135
vi replace..pls read
I want to replace some entries in an -x file. The problem is the enties have a "/" in them. And as we all know the replace uses the "/" as the delimiter(for lack of a better term).
So how do I include / in the replace argument>
In case I haven't explained myself here is an example:
aaa/bbb/ccc -> xxx/yyy/zzz
thanks
Mace
- 06-06-2007 #2
You can just change the delimeter from the forward slash to an apostrophe, so you'd be after something like
(At least, that works in vim, I haven't tried in plain old viCode::%s'aaa/bbb/ccc'xxx/yyy/zzz'g
)
HTH
Giles"Our greatest fear is not that we are powerless. Our greatest fear is Microsoft"
Registered linux user #391027
- 06-07-2007 #3Linux Newbie
- Join Date
- Jun 2006
- Posts
- 135
worked like a champ
thank you very much
mace


Reply With Quote
