linux - How to check if the file is downloaded with curl -
i writing shell script, need download 6 files internet, in script have done
curl curl b curl c , on it works, curl: (7) couldn't connect host files in middle of script example, download miss file b above error , download file c. catch error code execute successful download of files.
you chain them &&...
curl --fail && curl --fail b && curl --fail c... update: @nwk pointed out below, need add --fail make curl fail on bad http codes.
Comments
Post a Comment