I need to form a user-data script from Ruby so I need all escaping characters to remain. When I do this:
def user_data
"#!/bin/bash
sed -i -e '/<Name>loadbalanceServerIP<\/Name>/,/<Value>/s/<Value>[^<]*/<Value>1.1.1.1/' /home/wowza/conf/Server.xml"
end
The string removes the \ in the Name tag. If I put two \, it keeps them both. Any suggestion as how to keep the string the same way I wrote it?
Thank you!