-
I know curl and wget has their own progress bars. For specific reasons, I still want to use tqdm for this and I do not want to replace these tools with Python library (e.g., requests). |
Beta Was this translation helpful? Give feedback.
Answered by
casperdcl
Jan 18, 2022
Replies: 1 comment
-
curlurl="http://ipv4.download.thinkbroadband.com/100MB.zip"
total=$(curl -fsIL "$url" | sed -nr 's/.*Content-Length: ([0-9]+).*/\1/p')
curl -fsL "$url" | tqdm --bytes --total=$total > "$(basename "$url")" wgeturl="http://ipv4.download.thinkbroadband.com/100MB.zip"
total=$(wget -S --spider "$url" 2>&1 | sed -nr 's/.*Content-Length: ([0-9]+).*/\1/p')
wget -nv -O - "$url" | tqdm --bytes --total=$total > "$(basename "$url")" |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ketozhang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl
wget