I have an pages.txt
file with 100 URLs inside. I want to check them one by one and fail on the first problem. This is what I'm doing:
cat pages.txt | xargs -n 1 curl --silent
--output /dev/null --write-out '%{url_effective}: %{http_code}
'; echo $?
Exit code is 1
, but I see it only when the entire file is done. How to stop earlier, on the first problem?