Using Linux Bash, how can one turn a text file with:
http://example.org/
https://en.wikipedia.org/wiki/Main_Page
https://www.youtube.com/watch?v=mGQFZxIuURE
into:
http://example.org/ Example Domain
https://en.wikipedia.org/wiki/Main_Page Wikipedia, the free encyclopedia
https://www.youtube.com/watch?v=mGQFZxIuURE Mike Perry - The Ocean (ft. Shy Martin) - YouTube
or into:
http://example.org/
Example Domain
https://en.wikipedia.org/wiki/Main_Page
Wikipedia, the free encyclopedia
https://www.youtube.com/watch?v=mGQFZxIuURE
Mike Perry - The Ocean (ft. Shy Martin) - YouTube
?
How can one
- pull a URL from a list of URLs in a file,
- load the page,
- extract its page title,
- add that page title following that URL on the same line as the URL or on the line immediately following, then
perform those steps 1-4 for each subsequent URL in that list?
If not using Linux Bash, what other way is there?