Re: Sed scripting...

2004-09-28 Thread William D Ricker
Pete, > I have a need for some search and replace type activity... Perl can do s&r inplace as wellas filter, and handles context better than SED too. With modull Regexp::Common, you can even use a pattern crafted by an expert to match URLs. seems to me you may need Perl patterns' lookahead conte

Sed scripting...

2004-09-28 Thread Pete Clarke
Hi all, I have a need for some search and replace type activity... I need to change the urls in a bunch of files within a directory hierarchy. I have been playing with sed to get the replacing done, and have come up with the following: sed -e 's/^.*:\///g' -e '/^\//!s/^/\//g' -e '/$BASE_URL/!s/^