I downloaded this site https://en.wikipedia.org/wiki/List_of_sovereign_states and I want to extract a list with only countries in it.
I downloaded the whole html in a file named countries.
curl https://en.wikipedia.org/wiki/List_of_sovereign_states >countries
I found that all the countries are after a span id = ....
so I tried to search after those using grep -F span id countries
But how can i filter the results with sed ?
My problem is, I do not really understand how grep and sed work together the manualpages are not that good for a beginner and the internet is really not that helpful I hope you can help me.