curlコマンドのオプション
#curl
man curlより
-f(--fail)
Fail silently (no output at all) on server errors.
This is mostly done to better enable scripts etc to better deal with failed attempts.
-L(--location)
If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request on the new place. (強調は引用者による)
3XX(Locationヘッダ)に対応できるフラグ
-o(--output)
Write output to <file> instead of stdout.
curl "http://{one,two}.example.com" -o "file_#1.txt"のように書ける!
IMO:名前を変えるときに使う
-O(--remote-name)
Write output to a local file named like the remote file we get.
IMO:リモートのファイル名のまま取得できる!
-s(--silent)
Silent or quiet mode. Don't show progress meter or error messages.
curlとjqを合わせて使う
-S(--show-error)
When used with -s, --silent, it makes curl show an error message if it fails.
-fsSでまとめて使われそう