deibel
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-availab le/test.co nf
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?
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-availab
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I used your solutions and it works.