I have a list of domains in a file say list.txt I've got a report that many of these domains showing "Database Connection Error" I want to know all domains that can't connect with db properly. I thought curl could be a useful utility for that, so I try
curl -sSf http://`cat list.txt` > /dev/null | grep -I "database connection error"
But with that I get whole bunch of other issues, I still get others errors in output, also (the bigger concern) I do not get domain name for which that error outputs. Please someone help me.