Unix Programming - Re: how to use "sed" to replace old directory to new directory in a

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > June 2006 > Re: how to use "sed" to replace old directory to new directory in a





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: how to use "sed" to replace old directory to new directory in a
Ralf Fassel

2006-06-30, 7:25 am

* "sk" <sangeetha.kolandasamy@gmail.com>
| thanx .... i got the answer by trying as u said
|
| if i use : instaed of # .... i can get the correct answer

Note that ":" might occur in Unix pathnames (if it does you get the
same error as with "/"), whereas "#" is rather unlikely.

What is the error if you use "#"?
It works fine for me (and it should for you):

$ echo /foo/bar/file | sed -e 's#/foo/bar/#/something/else/#'
/something/else/file

R'
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com