M MSAgent Member May 8, 2001 87 0 0 Jul 25, 2002 #1 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.
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.
Spydermag68 Platinum Member Apr 5, 2002 2,608 96 91 Jul 25, 2002 #2 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
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
P PCHPlayer Golden Member Oct 9, 2001 1,053 0 0 Jul 25, 2002 #3 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
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