0

I just want to output to stdout cURL's last-used --max-time.

As cURL's manpage states:

-m, --max-time <seconds>

Maximum time in seconds that you allow the whole operation to take. [snip]

If this option is used several times, the last one will be used.

How do you print the "last one" (last-used value of --max-time) to stdout?

Note: I do not have curl-config installed. Before I install that, can someone confirm if, indeed, that will do what I want?

Also note: I am not using any cURL config files anywhere on my system.

  • Try looking in your .bash_history. – DisplayName Nov 6 '14 at 21:19
2

I think you might be misunderstanding what is meant by:

If this option is used several times, the last one will be used.

cURL doesn't remember this value between invocations or anything like that. The default on every fresh invocation is that there is no timeout, or infinite timeout, if you prefer. The quoted comment only applies to a command like this:

curl -m 5 -m 6 http://unix.stackexchange.com/

It just means that in this case, the timeout will be 6, not 5.

The next time you use cURL, neither 5 nor 6 will be remembered or used.

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.