Re: sed help please
Axel Freyn (2009-01-27 12:11 +0100) wrote:
> On Tue, Jan 27, 2009 at 09:35:46PM +1100, Daniel Dalton wrote:
>> sed s//media// filename
>>
>> One question, how can I include the / charactar in the search patton?
>> This works fine except, I need to add a / in the search patton, any
>> ideas how to do this so sed doesn't complain?
> Use a backslash \ bevor the slash/: "\/" works fine
Yes, or use some other character to separate the parameters of "s"
command. This example uses comma:
sed -e 's,pattern,replacement,'
Then "/" does not need backslash-escaping but "," does.
Reply to: