Skip to content

Instantly share code, notes, and snippets.

@SpEcHiDe
Created August 2, 2016 11:54
Show Gist options
  • Save SpEcHiDe/4fed29ffef4abc25f84f0f53dcfe57f1 to your computer and use it in GitHub Desktop.
Save SpEcHiDe/4fed29ffef4abc25f84f0f53dcfe57f1 to your computer and use it in GitHub Desktop.
#!/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
#!/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