Code: Select all
download_progress(){
while ([ $# -gt 0 ]) do
wget -v $1 -o /dev/stdout | while read LINE; do
case $LINE in
*%*)LINE=${LINE##*..};echo ${LINE%%%*};;
esac
done |Xdialog --gauge "Download progress ($# files remaining.)
Current file is:
$1" 0 0
shift
done
}
{export your CURL_PARAMETERS first}
Code: Select all
upload_progress(){
curl --progress-bar $CURL_PARAMETERS 2>&1 \
| tr "\r" "\n"|sed "s,# *,,gm" \
| Xdialog --title "Progress" --gauge "$1 \n transfering ..." 0 0
}