Created
August 2, 2016 11:54
-
-
Save SpEcHiDe/4fed29ffef4abc25f84f0f53dcfe57f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## $1 => filename excluding ".partX.rar" | |
## $2 => directory to download the file to | |
if [ $# -eq 0 ] ; then | |
echo "Usage Instructions" | |
echo "$0 <filename excluding \".partX.rar\"> <directory name>" | |
else | |
mkdir $2 | |
cd $2 | |
for i in {1..9} ; do | |
wget -cb "$1.part0${i}.rar" | |
done | |
for i in {10..99} ; do | |
wget -cb "$1.part${i}.rar" | |
done | |
if [ $(ps -e | grep wget | wc -l) -eq 0 ] ; then | |
echo "Download completed" | |
else | |
echo "Not completed" | |
fi | |
cd .. | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 0 ] | |
then | |
echo "usage instructions" | |
echo "${0} <download link excluding \".partXX.rar\"> <save to directory>" | |
else | |
mkdir $2 | |
cd $2 | |
for i in {1..9} | |
do | |
wget -cb "${1}.part0${i}.rar" | |
done | |
for i in {10..98} | |
do | |
wget -cb "${1}.part${i}.rar" | |
done | |
cd .. | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment