What is the meaning of -D -? I only found out -C - in the curl docs.
curl -s -D - \
-H "Referer:https://yahoo.com" \
"https://something.com"
What is the meaning of -D -? I only found out -C - in the curl docs.
curl -s -D - \
-H "Referer:https://yahoo.com" \
"https://something.com"
See the POSIX utility conventions document:
Guideline 13: For utilities that use operands to represent files to be opened for either reading or writing, the '-' operand should be used to mean only standard input (or standard output when it is clear from context that an output file is being specified) or a file named -.
Thus, when -
is used in a filename context, it is compliant with POSIX conventions to read or write the relevant data from stdin or stdout, as appropriate.