Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (15 sloc) 667 Bytes
# Data file size correction for wget lastSwapsUSD.csv download.
# Wget tends to download just part of the whole file.
# We will resume downloads until we get the whole file.
# Set dlpath before use.
dlpath=your/custom/path/lastSwaps.csv # SET BEFORE USE
logpath=your/custom/path/wget.log # SET BEFORE USE
truesize=$(curl -sI | grep -i content-length | awk '{print $2}' | tr -d '\r')
while [[ $dlsize != $truesize ]]; do
/usr/bin/wget -t 0 --random-wait -O $dlpath -a $logpath
dlsize=$(stat -c%s "$dlpath")
# echo "dlsize="$dlsize
# echo "truesize="$dlsize