A small tuning of wget – sometimes a remote servers are braking up the connection. This wget will try and try until download complete or user will cancel an action.
#!/bin/sh
#script file: my_wget.sh
if [ $1 -z ]; then
echo ""
echo "[usage:] my_wget.sh <address url>"
echo ""
exit 1
else
while true; do wget -c $1
if [ $? -eq 0 ]; then
echo "Download status: OK"; break
else continue
fi
done
fi
#END-SCRIPT#