Re: perl or bash question ["convert strings in a txt to html links"]

2010-03-01 Thread Dave Cross
On 27 February 2010 17:12, Vadkan Jozsef wrote: > How can I do that in bash or perl, that I have a txt file, e.g.: > > $cat file.txt > Hi, this is the content of the txt file, that contains links like this: > http://www.somewhere.it/, and it could contain: http://somewhere.com, > etc.. > This is t

Re: perl or bash question ["convert strings in a txt to html links"]

2010-02-27 Thread Roberto Ragusa
Vadkan Jozsef wrote: > Turning: > > http://website.org > http://www.website.org > > to this: > > http://website.org>http://website.org > http://www.website.org>http://www.website.org > sed -e 's_\(\bhttp://\S*\)_\1_g' Not perfect, as some characters should be urlencoded inside the href. --

Re: perl or bash question ["convert strings in a txt to html links"]

2010-02-27 Thread Russell Miller
On Saturday 27 February 2010 09:12:06 Vadkan Jozsef wrote: > How can I do that in bash or perl, that I have a txt file, e.g.: > something like sed -ie s/(.*)/\1/ filename Not sure of the EXACT syntax but that should be close. (apologies if this gets sent twice, I sent the first from the wrong a

perl or bash question ["convert strings in a txt to html links"]

2010-02-27 Thread Vadkan Jozsef
How can I do that in bash or perl, that I have a txt file, e.g.: $cat file.txt Hi, this is the content of the txt file, that contains links like this: http://www.somewhere.it/, and it could contain: http://somewhere.com, etc.. This is the second line, that doesn't contains links.. .. This is the X