cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl check for file with TFTP

From: Guenter <lists_at_gknw.net>
Date: Wed, 08 Apr 2009 05:01:34 +0200

Hi,
while doing some more file-exist checks I found some other things:

#!/bin/sh
curl -Iso /dev/null $*
echo "Status: $?"

1. http does always give me status 0 regardless if I pass a valid or
invalid URL while ftp returns non-0 for invalid URLs.
2. I would have expected that the -s switch should have been sufficient
to supress the header output, but seems not, and therefore the -o
/dev/null hack.

Gün.
Received on 2009-04-08