Avatar of deibel
deibel
Flag for Germany asked on

SED escape /

Hi experts,
I worked with the SED command and i want to replace a URL with the SED command in a configuration file.
In the configuration file i have this line:     /owa https://example.de/owa
And with the SED i want to replace this line so i used this command:

sed -e "s/owa https:.*/owa https://example2.de/owa/g" /etc/apache2/sites-available/test.conf

and i got this error message: sed: -e expression #1, char 27: unknown option to `s'

without the / the command works so how can i escape or use the / in the command?
Shell ScriptingLinuxSystem Programming

Avatar of undefined
Last Comment
deibel

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
oBdA

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Zephyr ICT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
deibel

ASKER
Thank you both.

I used your solutions and it works.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23