#!/bin/bash if [ "$1" == "" ] && [ ! -e res ]; then echo "Enter url:" read url else url=$1 fi if [ ! -e res ]; then wget $url -O html cat html | grep -o "http.*wma" > res perl -p -i -e s/http/mms/g res rm html fi for x in $(cat res) do NAME=$(echo $x | cut -d '/' -f6) mimms -r $x RESULTS_SIZE=`stat -c %s $NAME` if [ ! -e "$NAME" ] || [ "$RESULTS_SIZE" -lt 200 ]; then echo "$x" >> notDone if [ -e "$NAME" ]; then rm $NAME fi fi sed -i 1d res done rm res