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
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.
--
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
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