text to html
Martin Webster
lists at martinwebster.eu
Sat Jul 3 14:43:28 UTC 2010
On Sat, 2010-07-03 at 11:07 +0200, Jozsi Avadkan wrote:
> i have to make a "one liner" that get's the input, and gives the
> mentioned output.
I'd throw together a simple Perl script and use regular expressions to
get the desired output.
For example, read the file line-by-line (looking for a new line) and
then use substitution:
my $line = "bash/get-ssl-certificate-from-a-domain.html";
$line =~ s/^(.*)(\/)(.*)$/<br><font size=4>$1<\/font><br>\n<a href=
\"$3">$3<\/a>\n/;
print $line;
You'll need to add some control statements to deal with the repeated
classes; bash, debian etc.
--
As ever,
.\\artin
Martin Webster • Profile: http://www.linkedin.com/in/martinwebster
AOL: martinjwebster • Wordpress: http://martinwebster.info/
Jabber: martinwebster at xmpp.org.uk • ICQ: 15893823
More information about the ubuntu-users
mailing list