Skip to content

Instantly share code, notes, and snippets.

@Gregsen
Created December 6, 2013 11:40
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Gregsen/7822421 to your computer and use it in GitHub Desktop.
Save Gregsen/7822421 to your computer and use it in GitHub Desktop.
A nice progressbar for downloads using wget and Dialog.
#!/bin/bash
# heavily inspired by http://fitnr.com/showing-file-download-progress-using-wget.html
URL=<YOUR DOWNLOAD URL>
wget --progress=dot "$URL" 2>&1 |\
grep "%" |\
sed -u -e "s,\.,,g" | awk '{print $2}' | sed -u -e "s,\%,,g" | dialog --gauge "Download Test" 10 100
@SeaPhor
Copy link

SeaPhor commented Feb 17, 2018

Thank you! I really like and appreciate what you did here- I use wget a lot and so I made a slight modification so that I can use the same script for different things-
Changed URL= to URL=$1
Changed "Download Test" to "Downloading $2"
Added -

Requires 2 parameters-

My initial test run was as so-

./dl-wget-prgress.sh http://download.opensuse.org/distribution/leap/42.3/iso/openSUSE-Leap-42.3-DVD-x86_64.iso Leap-42.3
Thank You Again!
C4
https://github.com/SeaPhor/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment