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 lineNeeded libraries for windows:
No comments:
Post a Comment