eMarcel.com

Oracle Database, Fusion Middleware, Linux

My wget – niech ściąga

  • 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#

 

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close