I have a bash script that generates an xml file (drivers_list.xml) and has to subsequently remove this line:
xmlns="http://feed.elasticstats.com/schema/nascar/series-v2.0.xsd"
By looking around this page I found some suggestions and attempted,
sed -i '' "s/xmlns=\"http://feed.elasticstats.com/schema/nascar/series-v2.0.xsd\"//g" drivers_list.xml
Unfortunately, when I run it, I get the following error:
sed: 1: "s/xmlns="http://feed.el ...": bad flag in substitute command: 'f'
How can I fix this?
#instead of/as pattern split character, so it didn't need to escape the/in search or replace string, likesed "s#original_string_without_she#new_string_without_she#/g" drivers_list.xml.'instead of double quote"to contain thes/regexp/replacement/, so you didn't need to escape the"in the pattern string, because your pattern string didn't contain the'in this case. I can't find the pattern split character with English link, I only found a Chinese link(blog.chinaunix.net/uid-12072359-id-2960859.html), maybe you could understand it by translator.