With html bookmark saved from chrome or others, frequently exported as html file that comes with <a href tag that I'd like to filter and arrange:

<a href="https://<a-web-site>">Title of the website</a>

How to use basic linux's util like sed/grep/awk to filter and arrange items like:

Title of the website https://<a-web-site>

With sed:

$ echo '<a href="https://<a-web-site>">Title of the website</a>' | sed -e 's|.*href="\(.*\)".*>\(.*\)</a>|\2 \1|g'
Title of the website https://<a-web-site>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.