• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help, Vi gurus!

MSAgent

Member
fellows, how do I replace a word that has '/' in it? the command goes like this :%4/old/new/g as you have already known.


I struggled with it for a while but could not find the answer, and would appreciated it if anyone can help me out here.
 
I have not used UNIX for a while but I think you need to use the escape chracter \ just before the /

So try: %sed "s/old\/old/new/g" filename
 
VI actually lets you specify the delimiter character. I tend to use a ' (single quote) when my strings have a / in them.
Example: %s'old'new'g
 
Back
Top