Need to remove some part of the url and keep the remaining part same . Below is the part of my text file which contains like this
{
host = "http://nxt-newepisode.xcfm.crata.dive.com/err1.2.2/table/kenny.xml.gz"
}
{
host = "http://nxt-secondepisode.xcfm.crata.dive.com/err1.2.2/table/kenny.xml.gz"
}
from above two urls i want get rid off nxt- and keep the rest . I know using
sed -i 's/nxt-//g' FILE
can solve the issue but i want to be specific and only remove nxt- for first url and nxt- from second url without making changes to rest of file.
I am trying this
sed -i '/host/s#"http://nxt-newepisode.*"#" "#' FILE
See Question&Answers more detail:os