I have a list of URLs in file urls.txt.
If possible, I want to get all URLs that give a 404 error when I attempt to fetch them with
curl, and copy them to a new file.
For example the URLs in my file urls.txt:
mysite.com/page1 mysite.com/page2 mysite.com/page3 mysite.com/page4 mysite.com/page5 ... mysite.com/page100 ... mysite.com/page1000
so I want to try to fetch each one and if the fetching fails with error 404, I want to store the failing URL into a new file.