Help with changing the formatting of a text file.
Sorry for the thread title.
Here's what I'm trying to do. I need some arbitrary names for a database project I'm
working on. I got some stuff off the net but I need to get rid of the html code.
So I have a file with names like this.
<tr bgcolor="white"><td>MARY</td><td>2.629</td><td> 3,991,060 </td><td>1</td></tr>
<tr bgcolor="#f5fdd9"><td>PATRICIA</td><td>1.073</td><td> 1,628,911 </td><td>2</td></tr>
<tr bgcolor="white"><td>LINDA</td><td>1.035</td><td> 1,571,224 </td><td>3</td></tr>
<tr bgcolor="#f5fdd9"><td>BARBARA</td><td>0.98</td><td> 1,487,729 </td><td>4</td></tr>
So what I want to do is use sed, awk, grep.... to search for "<td>" and delete
it and everything before it and then search for "</td>" and delete it and everything
after it leaving only the name. I hope that makes sense.
Thanks for your time and help.
Zackarya
|