I want to remove <br />
from a file using sed -i ...
.
The /
gives me trouble.
This works:
sed -i e 's/<br/''/g' File.txt
But this didn't work:
sed -i e 's/'<br />'/''/g' File.txt
I want to remove <br />
from a file using sed -i ...
.
The /
gives me trouble.
This works:
sed -i e 's/<br/''/g' File.txt
But this didn't work:
sed -i e 's/'<br />'/''/g' File.txt
Use any other char after the s
sed -i 's_/_+_'
Should work
the s
subcommand from sed means substitution, and uses the next char as a delimiter, it could be almost anything. but it is a good pratice to not use any char that is related to your target text (HTML in this case), like <>/#.
Also it is advisable to avoid shell relevant ones $!()