Thank you all for your solutions. I'm going to use Christoph Spohr's because I'm more comfortable with
sed than I am with awk (although I know it's very powerful). I get an output with spaces after the pipe because there are spaces at the beginning of the line. How can I modify
Code:
sed -n '/Application/{N;s/.*Application=\([^"]*\).*\n\(.*\)<.*/\1 | \2/p}' file
to get rid of those spaces.
Also, what if my input file has another line between the two lines in question:
Code:
<tr>
<td height="23" align="default" valign="top">
<a href="MasterDetailResults.asp?textfield=a&Application=3D Home Architect 4">3D Home Architect 4</a> </td>
<td align="default" valign="top">
Approved </td>
</tr>
Once again, I need: Application Name|Status as my output. I've been removing the
<td align="default" valign="top">
line with
sed before finishing things off with the
sed code above.