Skip to content

Instantly share code, notes, and snippets.

@tonussi
Created March 10, 2016 02:15
Show Gist options
  • Save tonussi/edabf7e35260134bac7c to your computer and use it in GitHub Desktop.
Save tonussi/edabf7e35260134bac7c to your computer and use it in GitHub Desktop.
download.sh
#!/bin/bash
# Script
# Download things in a numeric pattern of links
# Author: Lucas Tonussi <[email protected]>
# Usage
# bash download.sh <cota_inferior> <cota_superior> <regex> <output_name>
# $1 $2 $3 $4
link=""
for i in $(seq $1 1 $2);
do
curl --compressed --silent "$3$i" |
wget --output-document="$4-audio-chapter-$1" $(egrep -o -m 1 "$3")
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment