Reputation: 8663
How do I make sure curl errors doesn't fail a script? I want to send all errors from curl to Dev null so that it doesn't fail a script and the script keeps going
What's the proper curl command to do that.
I tried curl --fail http://...
For curl to fail silently
Upvotes: 7
Views: 8336
Reputation: 18279
Have you tried:
curl http://.../ || true
And if you want to hide any error output, have you tried:
curl http://.../ 2>/dev/null || true
(Note: Untested.)
Upvotes: 8