[CentOS] text to html

Sudev Barar sbarar at gmail.com
Mon Jul 5 11:06:02 UTC 2010


On 5 July 2010 15:50, John Doe <jdmls at yahoo.com> wrote:
> From: Jozsi Avadkan <jozsi.avadkan at gmail.com>
>> input: http://pastebin.com/raw.php?i=MqPXZwc3
>> output: http://pastebin.com/raw.php?i=8QCkp4yv
>> i have to make a "one liner" that get's the input,
>> and gives the mentioned output.
>
> Here's my one line:
> awk -F/ ' { if (p != $1) { p=$1; print "<br>\n<br><font size=4>"$1"</font><br>"; } split($2, a, /\./); t=a[1]; print "<a href=\""$0"\">"t"</a>"; } ' <MYFILE>

Nice and impressive.

-- 
Regards,
Sudev Barar
Read http://blog.sudev.in for topics ranging from here to there.

PS: Replying using bottom post/in-line post makes email conversations
whole lot easier for meaningful dialogue. Snip out what is not
relevant. Adopt this and spread the message.



More information about the CentOS mailing list