Tuesday, 19 August 2014

Downloading with curl showing zenity GUI progress bar

Below is a simple command to show a GUI progress bar while downloading with curl command:
curl -o "big.iso" "http://domain.com/big.iso" 2>&1 | stdbuf -oL tr '\r' '\n' | sed -u 's/^ *\([0-9][0-9]*\).*\( [0-9].*$\)/\1\n#Download Speed\:\2/' | zenity --progress --title "Downloading"
Here is an example of how it might look:

No comments:

Post a Comment