Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to replace string in vi with "./" character 1

Status
Not open for further replies.

baggetta

Technical User
Feb 27, 2003
116
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
 
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.
 
:%s!\./!/!

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
thanks for the tips...i found nled editor from AIX and put it on Linux...much easier.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top