Hi,
I have a list in the following format
77 Infinite Dust
4 Illusion Dust
12 Dream Shard
29 Star's Sorrow
I need to change this to:
77
<a href="http://www.wowhead.com/?search=Infinite Dust">Infinite Dust</a>
4
<a href="http://www.wowhead.com/?search=Illusion Dust">Illusion Dust</a>
12
<a href="http://www.wowhead.com/?search=Dream Shard">Dream Shard</a>
29
<a href="http://www.wowhead.com/?search=Star's Sorrow">Star's Sorrow</a>
I've managed to get this list to the right format just missing the numbers by using:
sed 's|^[0-9]*.|<a href="http://www.wowhead.com/?search=|g' filename | sed 's|$|">|g' | sed 's#<a[ \t][ \t]*href[ \t]*=[ \t]*".*search=\([^"]*\)">#&\1</a>#'
But I can't figure out how to get it to keep the numbers before the list, any help appreciated, thanks!