sed, using line number to replace text



Hi,
I am converting a .csv file into an HTML file, all looks good apart
from one little problem. I need to make some sed inserts ( well I think
sed will do it ),
For every occurance of the word 'CLAIMS', within that line there is an
amount figure. I need to make that number bold as well, so I need to
insert a <B>, before the number. Using 'grep -n ' I can extract the
line numbers, see below:

183:<TR ALIGN=CENTER><TH>33003</TH><TD><B>CLAIMS
EUC</B></TD><TD></TD><TD>
</TD><TD></TD><TD></TD><TD></TD><TD></TD><TD>21781</TD>

340:<TR ALIGN=CENTER><TH>33003</TH><TD><B>CLAIMS
EUX</B></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD>7892</TD>

But how can I in sed use that line number , to change insert a tag.
What I need to end up with is something like... <B>7892</B>, like so::
<TR ALIGN=CENTER><TH>33003</TH><TD><B>CLAIMS EUX</B></TD><TD></TD><TD
</TD><TD></TD><TD></TD><TD></TD><TD></TD><TD><B>7892</B></TD>
Or is there a better way of doing it.
Thanks
Pete

.



Relevant Pages