Skip to content

Instantly share code, notes, and snippets.

@umnagendra
Created January 19, 2020 06:34
Show Gist options
  • Select an option

  • Save umnagendra/2459743fcd2ec2b5b862e7b2b76ea018 to your computer and use it in GitHub Desktop.

Select an option

Save umnagendra/2459743fcd2ec2b5b862e7b2b76ea018 to your computer and use it in GitHub Desktop.
Downloader Script
#!/bin/bash
readonly START_NUM=90000
readonly END_NUM=90300
function download() {
curl -v -O --fail http://file-cdn.example-cdn.download/jkkkdsfdsggffsdhfghgfdfghgkfjgh/files/${1}.mp4
rc=$?
if [ ${rc} != 0 ]; then
curl -v -O --fail http://file-cdn.example-cdn.download/jkkkdsfdsggffsdhfghgfdfghgkfjgh/files/${1}.mp4
fi
}
for i in {$START_NUM..$END_NUM}; do
download ${i}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment