0

man curl says:

-S, --show-error

When used with -s it makes curl show an error message if it fails.

If curl -S (uppercase) will show error instead an alleged default silent mode, then I don't understand the man further description about curl -s (lowercase) and especially I don't understand something like curl -sS.

What is curl -sS?

4

Same as: curl --silent --show-error

The man page is trying to tell you that these options are to be used together. This means

Run curl in silent mode, and show no output unless there is an error.

Note that S cannot be used with any other options, and s can be used without S. These options are most useful in shell scripting.

Example: (Pseudo Code)

do while displayInputPrompt
    fetch_data;

fetch_data()
curl -sS http://www.example.com/path/to/some/tar/file/file.tar.bz2

In the example, notice that the user won't see any output during the data fetch. The user will only see the input prompt displayed in the displayInputPrompt function, unless there is an error, in which curl will print the error to stdout i.e. your screen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.