I have the file below
next:
{
host = "http://nxt-newepisode.xcfm.crata.dive.com/err1.2.2/table/kenny.xml.gz"
};
second:
{
host = "http://nxt-secondepisode.xcfm.crata.dive.com/err1.2.2/table/kenny.xml.gz"
};
I want to replace the url based on nxt:{ host = "" and second: { host = "". How can I filter this using sed with a multiline match, as these are on multiple lines?
I tried:
sed -i '/second : {\rhost/s#"http://.*"#"next.com"#' file.txt
It doesn't work. I am using \r for new line but I also tried \n.