The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 02-25-2002
peter.herlihy peter.herlihy is offline
Registered User
 

Join Date: Nov 2001
Location: New Zealand
Posts: 333
If you're going to use vi for this then instead of using a / character for separations...use another character such as =

For example...instead of

:%s/\/dir1\/dir2\/image.gif/<new file>

use:

:%s=/dir1/dir2/image.gif=<new file>

or

:1,$ s=/dir1/dir2/image.gif=<new file>=g

Using the = for the separator will avoid having to specify the backslash to tell the substitution that the / is part of the substitution.



__________________
Pete