Replace with brake rule, sed example for windows

This is such a great way how to get some specific url in html file.
this is html example file - input.html
<body>
<p><a href="https://www.google.com/" target="_blank">Google</a></p>
<p><a href="https://www.w3schools.com/" target="_blank">W3Schools</a></p>
</body>
This command will replace all quotes with brake rule:
sed "s/\d034/\n/g" input.html
\d034 is ascii code for ".
/n stands for brake rule or in other words new line.
g means that replacement should do globally otherwise it replaces only first quote.

Output of this replacement will be
<body>
<p><a href=
https://www.google.com/
target=
_blank
>Google</a></p>
<p><a href=
https://www.w3schools.com/
target=
_blank
>W3Schools</a></p>
</body>
Now we got pretty nice urls in single line

Needed libraries for windows:

No comments: