I just learned how to extract data with bash from html script like this:
<td>hello</td>
<td>whatsup</td>
I can use awk -F '[<>]' '/<td>/,/<\/td>/ {print $3}' test.html
However how do I go about it, if it is separated with newlines like this?
<td>
hello
</td>
<td>
whatsup
</td>
Going through tutorials the best code I could come up with, is this, which doesn't seem to work.
awk -F '\n' '/<td>/,/<\/td>/ {print $2}' test.html