I have done something in a bash script and my cURL command is no longer showing the status bar. I need to save the HTTP response code to a variable, $status:
I have:
status=$(curl -s -S -o curl.tmp -w %{http_code} --progress-bar -u $USERNAME:$PASSWORD -T "$FILE_TO_UPLOAD" "$FILE_ON_REMOTE_SERVER" )
status=$(($status + 0)) # force integer
if [[ $status > 400 ]]; then
# an error occurred; do something
fi
Why isn't the progress bar displaying?