brkn
|
2012-11-11
, 18:41
|
Posts: 299 |
Thanked: 557 times |
Joined on Aug 2012
|
#4601
|
|
2012-11-11
, 18:43
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#4602
|
Ok great. I am not actively following this thread so if you have further requests in the future please pm me.
|
2012-11-11
, 19:15
|
Posts: 299 |
Thanked: 557 times |
Joined on Aug 2012
|
#4603
|
|
2012-11-11
, 19:25
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#4604
|
#!/bin/bash bar="========================================" barlength=${#bar} FOLDER="https://dl.dropbox.com/u/17706605" FILE[0]="N9_QuickTweak_en_v9.4.pdf" FILE[1]="N9_QuickTweak_ru_v9.4.pdf" echo "Calculating download size ..." for (( i = 0 ; i < ${#FILE[@]} ; i++ )) do if [ -f "${FILE[$i]}" ] ; then rm -f "${FILE[$i]}" ; fi length=$(wget "$FOLDER/${FILE[$i]}" --spider --server-response -O - 2>&1 | sed -ne '/Content-Length/{s/.*: //;p}') totallength=$(($totallength + $length)) touch "${FILE[$i]}" nice -n 19 wget -N -q "$FOLDER/${FILE[$i]}" 2>/dev/null & done echo "Downloading $totallength bytes" tmp=1 totaltmp=1 while [[ $totaltmp -lt $totallength ]]; do tmp1=$(stat "${FILE[0]}" | grep Size | awk '{print $2}') tmp2=$(stat "${FILE[1]}" | grep Size | awk '{print $2}') totaltmp=$(($tmp1 + $tmp2)) n=$(($totaltmp * $barlength / $totallength)) percent=$((100 * $totaltmp / $totallength)) printf "\r[%-${barlength}s]" "${bar:0:n}" printf " $percent%%" sleep 0.1 done printf "\n"
bash /opt/N9QTweak/Tweaks/downloader.sh
|
2012-11-11
, 19:33
|
Posts: 299 |
Thanked: 557 times |
Joined on Aug 2012
|
#4605
|
I'm not changed anything:
And I run it with:Code:#!/bin/bash ...
But it complain about "+"...Code:bash /opt/N9QTweak/Tweaks/downloader.sh
~/MyDocs/Downloads $ bash /opt/N9QTweak/Tweaks/downloader.sh Calculating download size ... Downloading 6089447 bytes [========================================] 100% ~/MyDocs/Downloads $ ls N9_QuickTweak_en_v9.4.pdf N9_QuickTweak_ru_v9.4.pdf ~/MyDocs/Downloads $
|
2012-11-11
, 19:37
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#4606
|
cd /home/user/MyDocs/Documents bash /opt/N9QTweak/Tweaks/downloader.sh
|
2012-11-11
, 19:54
|
|
Posts: 491 |
Thanked: 299 times |
Joined on Jul 2012
@ Pordenone IT
|
#4607
|
|
2012-11-11
, 20:14
|
Posts: 117 |
Thanked: 20 times |
Joined on Aug 2012
|
#4608
|
|
2012-11-12
, 01:13
|
Posts: 73 |
Thanked: 13 times |
Joined on Dec 2011
@ Philippines
|
#4609
|
|
2012-11-12
, 03:17
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#4610
|
The Following User Says Thank You to thedead1440 For This Useful Post: | ||
Tags |
hebrew vkb, n9 qtweak, n9 quick tweak, n9 quicktweak, root-ssh |
Thread Tools | |
|