/bin/bash
Do not abuse the power to wget
if [ $# -ne 2 ]; then echo "incorrect function parameters, should be: $0 start finish " exit 1 fi if [ $1 -gt $2 ]; then echo "incorrect, start should be before finish: $0 start finish " exit 1 fi
for(( i=$1; i<=$2; i++ )) do FILENAME="JavaPosse${i}.mp3" echo "getting $FILENAME" wget http://traffic.libsyn.com/dickwall/$FILENAME done