I am trying to substitute "<br>" to “\n” but do not find how use the <> with tr. Any idea to do this command work:
echo "HTML example<br>Print new line<br>please<br>not work" | tr "<br>" "\n"
edit
The FatalError answer do not work for my OSX Lion. I don’t know why, but this simple sed command do not make new line, it return only
HTML examplenPrint new linenpleasennot work
I am using GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11).
Any other idea?
tris for mapping chars to other chars. For this task I’d suggest usingsed:This tells
sedto substitute every instance of<br>with a newline char.Edit
If you have problem, because the /\ in sed, this will solve the problem