From nospaze at gmail.com Fri Jun 5 20:32:41 2015 Content-Type: multipart/mixed; boundary="===============8686078114567312977==" MIME-Version: 1.0 From: NoSpaze To: users at lists.fedoraproject.org Subject: Re: text to html Date: Sat, 03 Jul 2010 20:43:37 +0200 Message-ID: <1278182618.2310.2.camel@rodolfoap.rap.net> In-Reply-To: AANLkTimVzUj2r6l_thtWvuszrBgaxaNCmXk93bHGtf7y@mail.gmail.com --===============8686078114567312977== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Sat, 2010-07-03 at 15:20 +0100, Sam Sharpe wrote: > On 3 July 2010 14:16, Rodolfo Alcazar Portillo wrot= e: > > On Sat, 2010-07-03 at 11:07 +0200, Jozsi Avadkan wrote: > >> input: > >> http://pastebin.com/raw.php?i=3DMqPXZwc3 > >> > >> output: > >> http://pastebin.com/raw.php?i=3D8QCkp4yv > >> > >> it will be a long day.. :D > > > > Not likely. Obviously, you must replace lynx with cat . > > > > lynx -dump http://pastebin.com/raw.php?i=3DMqPXZwc3|sed -r 's/([^\/]*)\= /(.*)\.html/
\1<\/font>
\n\2<\= /a> |/g' > > > = > I'm afraid that's a fail - it doesn't match the desired output. Oh, oh, oh, oh. Didn't check the grouping. There you go (one-liner, just using one FOR): FILE=3D$(lynx -dump http://pastebin.com/raw.php?i=3DMqPXZwc3); SETS=3D$(ech= o "$INPUT"|cut -f1 -d/|uniq); for S in $SETS; do echo "
$= S
"; echo "$FILE"|grep "^$S"|sed -r "s/(.*)\/(.*).html/
\2<\/a>|/g"; echo "
"; done Bye! ---------------------------------------------- Rodolfo Alcazar Portillo - nospaze(a)gmail.com otbits.blogspot.com / counter.li.org: #367962 ---------------------------------------------- Programming is like sex: One mistake and you're providing support for a lifetime. -- ? --===============8686078114567312977==--