How to check if the file is downloaded with curl
<p>I am writing a shell script, I need to download 6 files from internet, In the script I have done it as </p>

<pre><code>curl a
curl b
curl c
and so on
</code></pre>

<p>It works, but sometimes <code>curl: (7) couldn't connect to host</code> for some files in the middle of script for example, It will successfully download a but miss the file b with the above error and will download the file c. I would like to catch this error so that my code will execute with the successful download of all the files.</p>