Jan 27, 2006 #1 baggetta Technical User Joined Feb 27, 2003 Messages 116 Location US Can you show me how to replace the following string in vi. a ./temp/db a ./temp/db change it to: a /db/new a /db/new1
Can you show me how to replace the following string in vi. a ./temp/db a ./temp/db change it to: a /db/new a /db/new1
Jan 27, 2006 #2 p5wizard IS-IT--Management Joined Apr 18, 2005 Messages 3,165 Location BE :1,$ s/^a ./a / would do the trick HTH, p5wizard Upvote 0 Downvote
Jan 27, 2006 #3 Annihilannic MIS Joined Jun 22, 2000 Messages 6,317 Location AU Instead of using :s/water/wine/ you can use any character in place of the "/", for example :s#water#wine#. Alternatively you could escapae the '/' characters in your search and replace strings, i.e. use '\/'. Annihilannic. Upvote 0 Downvote
Instead of using :s/water/wine/ you can use any character in place of the "/", for example :s#water#wine#. Alternatively you could escapae the '/' characters in your search and replace strings, i.e. use '\/'. Annihilannic.
Jan 27, 2006 1 #4 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR :%s!\./!/! Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
:%s!\./!/! Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Jan 27, 2006 Thread starter #5 baggetta Technical User Joined Feb 27, 2003 Messages 116 Location US thanks for the tips...i found nled editor from AIX and put it on Linux...much easier. Upvote 0 Downvote