#!/bin/tcsh -f echo -n "getting $1... " >>log echo START "$1" wget http://www.mame.dk/download/rom/"$1" -O "$1".ask set getstr=`cat "$1".ask | grep bigstdtext | tail -1 | cut -d'"' -f4` #set getstr=`cat "$1" | grep "download/" | cut -d'"' -f2` echo "GET http://www.mame.dk/download/rom/$1/$getstr HTTP/1.0" > getfile cat >>getfile << EOF Accept: application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msw ord, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Referer: http://www.mame.dk/download/exerion Accept-Language: el Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) Host: www.mame.dk Proxy-Connection: Keep-Alive EOF #instead of socket you could the netcat program cat getfile|socket proxy.ntua.gr 8080 >$1.where set url=`cat "$1".where | grep "click here" | cut -d'"' -f 6` wget -nc "$url" echo END "$1" /bin/rm "$1.ask" /bin/rm "$1.where" echo done with "$1" >>log echo ""