I have a EC2 userdata bash script with some sed entries as follows. The userdata was base64 encoded as part of a launch template.
sed -i -- "s/{{ data_dir }}/$${CONSUL_DATA_DIR//\//\\\/}/g" $CONSUL_DEFAULT_CONFIG
However I’m getting an error when the instance builds with the below:
sed: -e expression #1, char 39: unknown option to `s'