Article 5E987 [SOLVED] awk anyone?

[SOLVED] awk anyone?

by
gregors
from LinuxQuestions.org on (#5E987)
Hi there!

I want to make a news page (html with lots of pictures) more handy. Since my cat|tr|grep chain didn't lead to what I want, I think that awk might be able to do the job.
Problem is that I don't just want single lines but some combination of corresponding lines.

To make long things short: I want to look for a line with

<span class="teaser__headline">++ Japan beginnt mit Impfprogramm ++</span>

and take its (visible) text, combining it with the text from the following line that starts with

<p class="teaser__shorttext">Funf Monate ...

So I need to look for "teaser__headline", take the text from that paragraph and make it followed by the text from the line that contains "teaser__shorttext".

The result should look similar to

++ Japan beginnt mit Impfprogramm ++
Funf Monate ...

The next (?) step would be to see how things are linked with <a> tags and use them to make my result clickable ...

If there's a better forum my question please let me know. And if you don't know awk just like me: sorry to bother ...

TIA

Gregorlatest?d=yIl2AUoC8zA latest?i=Ji0OdG95b2s:V2lZRwzIyQ0:F7zBnMy latest?i=Ji0OdG95b2s:V2lZRwzIyQ0:V_sGLiP latest?d=qj6IDK7rITs latest?i=Ji0OdG95b2s:V2lZRwzIyQ0:gIN9vFwJi0OdG95b2s
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments