![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find and replace | javeed7 | Shell Programming and Scripting | 1 | 04-02-2008 06:00 AM |
| find and replace | rakshit | Shell Programming and Scripting | 4 | 01-23-2008 11:52 PM |
| find and replace | mahabunta | UNIX for Dummies Questions & Answers | 7 | 09-21-2006 09:05 AM |
| find and replace | valhutch | UNIX for Dummies Questions & Answers | 4 | 07-29-2006 02:20 PM |
| Find & Replace | gagansharma | Shell Programming and Scripting | 3 | 11-27-2001 12:17 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi
In our html pages, we have the image path as "/dir1/dir2/image.gif". We are changing the location of the image directory. So now we wish to do a global search and replace the path. I think we are having trouble with forward slash character. Please help Thanks in advance Vikas a newbie |
| Forum Sponsor | ||
|
|
|
|||
|
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 |
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|