I have this Bash script but it is returning an error with the sed
command(sed: -e expression #1, char 102: unknown option to `s'
).
Does anyone know how to fix this?
vhostConfig=$(cat "/etc/apache2/sites-available/$serverName.conf")
vhostConfig=$(echo "$vhostConfig" | sed "s/<VirtualHost \*:80>/<VirtualHost *:80>\nRewriteEngine On\nRewriteCond %{HTTPS} !=on\nRewriteRule ^/?(.*) https:\/\/$serverName\/ [R,L]/")
I tried to change the double quotes to single quotes but it did not work.