Is it possible to make curl only save the output of
curl -o if the file is of a certain mime-type?
For example, I might use the following command to download a bunch of images off a server...
curl -o file_#1.jpg http://wwww.mysite.com/images.php?id=[1-50]
On that site, it may return text/html if there isn't an image with that ID. Is there any way to filter the curl results so it only saves files of type image/jpeg?