curl hide progress bar output on Linux/Unix shell scripts

ww‮uttual.w‬ri.com
curl hide progress bar output on Linux/Unix shell scripts

To hide the progress bar output when using curl in a Linux or Unix shell script, you can use the -s or --silent option. This will suppress the progress meter and error messages.

For example:

curl -s https://example.com/ > /dev/null

This will download the content from https://example.com/ and redirect the output to /dev/null, effectively discarding it. The progress bar and any error messages will not be displayed.

You can also use the -S or --show-error option to show error messages, but suppress the progress meter. This can be useful for debugging purposes.

For example:

curl -S https://example.com/

This will download the content from https://example.com/ and display any error messages, but the progress meter will not be shown.

Note that the -s and -S options are mutually exclusive and cannot be used together.

Created Time:2017-10-28 14:02:29  Author:lautturi