perl or bash question ["convert strings in a txt to html links"]
Roberto Ragusa
mail at robertoragusa.it
Sat Feb 27 20:36:46 UTC 2010
Vadkan Jozsef wrote:
> Turning:
>
> http://website.org
> http://www.website.org
>
> to this:
>
> <a href=http://website.org>http://website.org</a>
> <a href=http://www.website.org>http://www.website.org</a>
>
sed -e 's_\(\bhttp://\S*\)_<a href="\1">\1</a>_g'
Not perfect, as some characters should be urlencoded
inside the href.
--
Roberto Ragusa mail at robertoragusa.it
More information about the users
mailing list