I'm wondering if it's possible (recommended might be the better word) to use sed to convert URLs into HTML hyperlinks in a document. Therefore, it would look for things like:
http://something.com
And replace them with
<a href="http://something.com">http://something.com</a>
Any thoughts? Could the same also be done for email addresses?
you can use awk
output
This might work.
It depends on the url being followed by a space (which isn't always the case).
You could do similar for e-mails with.
Those might get you started. I suggest leaving off the -i option to test your output before making the changes inline.
While you could use sed, and I will typically only use sed if I need something that's write-only (that is, it only needs to work and doesn't need to be maintained).
I find the Python regular expression library to be more accessible (and gives the ability to add more powerful constructs).
Personally, I find that much easier to read and maintain.