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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -