Skip to content

Instantly share code, notes, and snippets.

@mdijoux
Created April 29, 2016 10:33
Show Gist options
  • Save mdijoux/2544303378a91c013a40fb71f4c19063 to your computer and use it in GitHub Desktop.
Save mdijoux/2544303378a91c013a40fb71f4c19063 to your computer and use it in GitHub Desktop.
Retrieve sequencial files with wget
#!/bin/sh
if [ $# -lt 3 ]; then
echo "Usage: $0 url_format seq_start seq_end [wget_args]"
exit
fi
url_format=$1
seq_start=$2
seq_end=$3
shift 3
printf "$url_format\\n" `seq $seq_start $seq_end` | wget -i- "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment