perl/bash question - html link out of text

2010-03-07 Thread Vadkan Jozsef
I don't know how to modify the: sed -r 's,.*(http://[^ \$]+).*,a href=\\1\\1/a,' command, to not just: $ echo test string http://somewhere.uk/ test | sed -r 's,.*(http://[^ \$]+).*,a href=\\1\\1/a,' a href=http://somewhere.uk/;http://somewhere.uk//a rather output this: test string a

Re: perl/bash question - html link out of text

2010-03-07 Thread Mark Knoop
At 18:07 on 07 Mar 2010, Vadkan Jozsef wrote: I don't know how to modify the: sed -r 's,.*(http://[^ \$]+).*,a href=\\1\\1/a,' command, to not just: $ echo test string http://somewhere.uk/ test | sed -r 's,.*(http://[^ \$]+).*,a href=\\1\\1/a,' a