#!/bin/bash STORAGE_DIR=`dirname $0`/download/mobiticket DOWNLOAD_DIR=$STORAGE_DIR/rest-pages mkdir -p ${DOWNLOAD_DIR} for i in `cat ${STORAGE_DIR}/page-ids.txt` do file="$DOWNLOAD_DIR/$i.wml" if [ ! -f $file ] then URL="http://www.mobiticket.es/shop/page.do?page=FITXA&id_res=$i&shopName=ticket_restaurant&carrierName=OffPortal" wget $URL -O $file sleep 0.5 fi done